sgilmore10 commented on code in PR #37581:
URL: https://github.com/apache/arrow/pull/37581#discussion_r1316400791
##########
matlab/src/matlab/+arrow/+array/TimestampArray.m:
##########
@@ -30,15 +30,15 @@
end
function dates = toMATLAB(obj)
- time = obj.Proxy.toMATLAB();
+ epochTime = obj.Proxy.toMATLAB();
- epoch = datetime(1970, 1, 1, TimeZone="UTC");
+ timeZone = obj.Type.TimeZone;
+ ticksPerSecond = obj.Type.TimeUnit.ticksPerSecond();
- tz = obj.Type.TimeZone;
- ticsPerSecond = ticksPerSecond(obj.Type.TimeUnit);
-
- dates = datetime(time, ConvertFrom="epochtime", Epoch=epoch, ...
- TimeZone=tz, TicksPerSecond=ticsPerSecond);
+ % UNIX Epoch (January 1st, 1970).
+ unixEpoch = datetime(0, ConvertFrom="posixtime");
Review Comment:
I think you need to specify `TimeZone="UTC"` here for the conversion to work.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]