# TimeSeries has no option for TimeZone over-ride. What is the most efficient workaround?

I am importing TimeSeries data from an external CSV file. Those CSV date/time values are implicitly expressed as UTC. But TimeSeries imports them using \TimeZone. And although TimeSeriesShift allows me to "realign" the events to ( - \TimeZone) , Mathematica still presents time values with an offset of \$TimeZone. How might I implement an option for TimeSeries[...] along the lines of TimeZone -> 0? • Perhaps Block[{$TimeZone = 0}, TimeSeries[ ...]]? Apr 26, 2019 at 16:49

Specify both DateFunction and TimeZone upon import and creation of TimeSeries.

• Gosia -- thank you! Aug 3, 2019 at 19:52

One idea is to use the DateFunction option. Here is some made up data:

data = {{"10pm jan 1",1}, {"11pm jan 1", 2}, {"1am jan 2", 3}};


Default behavior using TimeSeries:

DateListPlot @ TimeSeries[data]


Using the option DateFunction to adjust the TimeZone:

DateListPlot @ TimeSeries[data, DateFunction -> (DateList[#, TimeZone->0]&)]


OBJECTIVE: The following string-valued timestamps are to be imported as UTC TimeZone values

csvImport = {{"1968-01-01 00:00", 100}, {"1968-01-01 00:01", 200}};


The following results in a corrupted time value of "1968-01-01 00:00 GMT-5"

TimeSeries[csvImport]["FirstDate"]


The following yields correct timevalues and TimeZone, but does not work in my production WLS script

Block[{$$TimeZone},$$TimeZone = 0;
TimeSeries[csvImport]["FirstDate"]]


The following are correct timevalues but wrong displayed TimeZone

altCVSImport = csvImport;
altCVSImport[[All, 1]] = DateObject[#, TimeZone -> 0] & /@ altCVSImport[[All, 1]];
TimeSeries[altCVSImport]["FirstDate"]


The following tweak displays correct timevalue and TimeZone

TimeSeries[altCVSImport, "TimeZone" -> 0]["FirstDate"]