You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "kevingurney (via GitHub)" <gi...@apache.org> on 2023/09/05 21:02:14 UTC

[GitHub] [arrow] kevingurney commented on a diff in pull request #37581: GH-37572: [MATLAB] Add `arrow.array.Date64Array` class

kevingurney commented on code in PR #37581:
URL: https://github.com/apache/arrow/pull/37581#discussion_r1316403284


##########
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:
   Thanks for catching this!



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org