Skip to content

Commit

Permalink
fix lossy datetime conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
lawrence-mbf committed Jan 26, 2024
1 parent 33b8178 commit 9d77234
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions +types/+util/correctType.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@
end

function Datetime = formatDatetime(Datetime)
if all(0 == [Datetime.Hour] & 0 == [Datetime.Minute] & 0 == [Datetime.Second])
formatString = 'yyyy-MM-dd';
elseif all(cellfun('isempty', {Datetime.TimeZone}))
if all(cellfun('isempty', {Datetime.TimeZone}))
formatString = 'yyyy-MM-dd''T''HH:mm:ss.SSSSSS';
else
formatString = 'yyyy-MM-dd''T''HH:mm:ss.SSSSSSZZZZZ';
Expand Down

0 comments on commit 9d77234

Please sign in to comment.