Skip to content

Commit

Permalink
switch to eastern timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanLaserGit committed Jan 5, 2024
1 parent 57a8a68 commit b66623d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion python/configure-datastream.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import argparse, json, os
from datetime import datetime, timedelta
from pathlib import Path
import pytz as tz

def write_json(conf, out_dir, name):
conf_path = Path(out_dir,name)
Expand Down Expand Up @@ -53,7 +54,7 @@ def create_ds_confs_daily(conf, today, tomorrow):
def create_confs(conf):

if conf['globals']['start_date'] == "DAILY":
now = datetime.now()
now = datetime.now(tz.timezone('US/Eastern'))
today = now.replace(hour=0, minute=0, second=0, microsecond=0)
tomorrow = today + timedelta(days=1)

Expand Down
2 changes: 1 addition & 1 deletion scripts/stream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ SUBSET_ID=$(echo "$config" | jq -r '.subset.id')
HYDROFABRIC_VERSION=$(echo "$config" | jq -r '.subset.version')

if [ $START_DATE == "DAILY" ]; then
DATA_PATH="${PACAKGE_DIR%/}/data/$(date +'%Y%m%d')"
DATA_PATH="${PACAKGE_DIR%/}/data/$(env TZ=US/Eastern date +'%Y%m%d')"
fi

if [ ${#RELATIVE_TO} -gt 0 ] ; then
Expand Down

0 comments on commit b66623d

Please sign in to comment.