kt-test-account commited on
Commit
27015a1
·
1 Parent(s): 70c3f35

proper timezone

Browse files
Files changed (3) hide show
  1. pyproject.toml +2 -1
  2. requirements.txt +2 -1
  3. utils.py +12 -2
pyproject.toml CHANGED
@@ -11,5 +11,6 @@ dependencies = [
11
  "scikit-learn",
12
  "huggingface_hub",
13
  "vl-convert-python",
14
- "hf_transfer"
 
15
  ]
 
11
  "scikit-learn",
12
  "huggingface_hub",
13
  "vl-convert-python",
14
+ "hf_transfer",
15
+ "pytz"
16
  ]
requirements.txt CHANGED
@@ -1,4 +1,5 @@
1
  scikit-learn
2
  numpy
3
  streamlit
4
- huggingface_hub
 
 
1
  scikit-learn
2
  numpy
3
  streamlit
4
+ huggingface_hub
5
+ pytz
utils.py CHANGED
@@ -300,7 +300,17 @@ if __name__ == "__main__":
300
  )
301
 
302
  ## Update time
303
- now = datetime.now()
304
- formatted = now.strftime("Updated on %Y-%m-%d %H:%M:%S EST")
 
 
 
 
 
 
 
 
 
 
305
  with open("competition_cache/updated.txt", "w") as file:
306
  file.write(formatted)
 
300
  )
301
 
302
  ## Update time
303
+
304
+ import datetime
305
+ import pytz
306
+
307
+ # Get the current time in EST
308
+ est_timezone = pytz.timezone('US/Eastern')
309
+ current_time_est = datetime.datetime.now(est_timezone)
310
+
311
+ # Format the time as desired
312
+ formatted_time = current_time_est.strftime("%Y-%m-%d %H:%M:%S %Z")
313
+
314
+ formatted = f"Updated on {formatted_time}"
315
  with open("competition_cache/updated.txt", "w") as file:
316
  file.write(formatted)