Wrapping up for the night. Better alerts and things with the correct timezone...
This commit is contained in:
@@ -131,8 +131,8 @@ async function handle_qry__event_file(
|
||||
|
||||
// It is very important to know that all of the created_on and updated_on timestamps are in ET timezone. Sorry...?
|
||||
let for_et_tz_datetime = new Date(current_datetime.toLocaleString('en-US', {timeZone: 'America/New_York'}));
|
||||
const offset_minutes = for_et_tz_datetime.getTimezoneOffset();
|
||||
const adjusted_for_et_tz_datetime = new Date(for_et_tz_datetime.getTime() - offset_minutes * 60 * 1000);
|
||||
const adjust_minutes = for_et_tz_datetime.getTimezoneOffset(); // Usually 240 minutes for ET.
|
||||
const adjusted_for_et_tz_datetime = new Date(for_et_tz_datetime.getTime() - adjust_minutes * 60 * 1000);
|
||||
const adjusted_for_et_tz_datetime_iso_str = adjusted_for_et_tz_datetime.toISOString().slice(0, -1);
|
||||
console.log(`Adjusted for ET TZ time:`, adjusted_for_et_tz_datetime_iso_str);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user