I'm creating a 1-minute bar .t6 file from a US data source that only specifies the time in New York market hours: 9:30-16:00 ET. However .t6 files require timestamps to be in UTC zone.

Is there anyway to check to see if the particular M1 bar is in daylight savings time, so I can +4 or +5 hours accordingly to get UTC time?

checking (dst(ET,0)) doesn't work because the 2nd argument is a bar offset, and there are no bars yet in main(). If I do it in run(), the first asset does not evaluate dst() correctly, subsequent assets do evaluate dst() correctly. Strange.

I looked at the sample CSVtoHistory.c sample script and it hardcodes any hour adjustment. Surely that's not a good solution if my historical data crossed DST periods.

There used to be a HistoryZone system variable, but it appears to be removed in recent releases.

Any ideas?

Many thanks!