Hi Ricardo,
Here we are dealing with the different parameters of dates, namely granularities and time zones. There are also calendars, time systems and date formats, but we will not talk about those here.
First note the InputForm structure of a date object:
In[1]:= Now // InputForm
Out[1]//InputForm= DateObject[{2026, 10, 6, 11, 35, 46.874883}, "Instant", "Gregorian", -5.]
What we see there is the structure DateObject[datelist, granularity, calendar, timezone]. There could also be two additional arguments for time system and date format.
Your olddata has “Instant” granularity and time zone -6. Your new data has “Day” granularity and time zone None. Check
In[12]:= ColumnTypes[olddata]
Out[12]= <|
"Timestamp" -> "Date"::["Integer64", "Instant", "Gregorian", -6.],
"Value" -> "Real64"
|>
In[13]:= ColumnTypes[newdata]
Out[13]= <|
"Timestamp" -> "Date"::["Integer32", "Day", "Gregorian", None],
"Value" -> "Real64"
|>
Note how the “Date” type arguments have the same structure and order, except for the first one (the type of integer), which indicates how we are internally storing the dates (in some other calendar, say UnixTime for instants).
When you insert one time series into the other one, then we automatically select a granularity and a time zone for you. This depends on the order of arguments. Compare TimeSeriesInsert[newdata, olddata] and TimeSeriesInsert[olddata, newdata]. In the latter case, which is what you did, we project the day granularity into instants, selecting for each day the beginning instant. And then we instantiate the None time zone into the time zone -6, which can create shifts of six hours, moving some of the time stamps to the previous day.
Therefore it’s better if you first align the two time series to what you would like to have in output. For example, imagine you want to keep instants, but now all in time zone None. Then you can do something like this:
TimeSeriesInsert[ TimeSeries[olddata, TimeZone -> None], newdata ]
This is still going to introduce some 6 hours shifts in olddata, but will not spoil the day of newdata.
We can change date parameters in multiple ways, and I’ve mentioned only one: options. We can do it with CastColumns, or with date-related functions, like DateObject itself, or ConformDates.
Hope this helps,
Jose.