Skip to content

Can't correctly convert datetime type #133

@henry2004y

Description

@henry2004y

Hi,

I recently found that the datetime type in Matlab cannot be correctly read in Julia. For example, in Matlab

t = datetime('now','TimeZone','local','Format','d-MMM-y HH:mm:ss Z')
save('test.mat', t)

In Matlab it has the following display

 datetime

   17-Dec-2019 10:25:30 -0500

Then in Julia,

using MAT
vars = matread("test.mat")

It showed

Dict{String,Any} with 2 entries:
  "__opaque__" => Dict{String,Any}("s1"=>Int8[77, 67, 79, 83],"arr"=>("", UInt32[0xdd000000; 0x00000002; … ; 0x00000001; 0x00000001]),"s0"=>Int8[116],"s2"=>Int8[1…
  ""           => UInt8[0x00 0x01 … 0x00 0x00]

Anybody knows how to fix this? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions