Why Must the TimeZone be Specified for datetime when the Time Zone is Included in the DateString?
Suppose I have a date string
fu = "Mon Mar 3 12:20:40 EST 2025"
Converting to datetime causes an error because the TimeZone input is not specified
try
d = datetime(fu,’InputFormat’,’eee MMM d HH:mm:ss z yyyy’)
catch ME
ME.message
end
Why does TimeZone need to be specified if EST is included in the input?
Specifying the TimeZone then results in a warning, though I’m not sure what the "unexpected results" might be.
d = datetime(fu,’InputFormat’,’eee MMM d HH:mm:ss z yyyy’,’TimeZone’,’EST’)Suppose I have a date string
fu = "Mon Mar 3 12:20:40 EST 2025"
Converting to datetime causes an error because the TimeZone input is not specified
try
d = datetime(fu,’InputFormat’,’eee MMM d HH:mm:ss z yyyy’)
catch ME
ME.message
end
Why does TimeZone need to be specified if EST is included in the input?
Specifying the TimeZone then results in a warning, though I’m not sure what the "unexpected results" might be.
d = datetime(fu,’InputFormat’,’eee MMM d HH:mm:ss z yyyy’,’TimeZone’,’EST’) Suppose I have a date string
fu = "Mon Mar 3 12:20:40 EST 2025"
Converting to datetime causes an error because the TimeZone input is not specified
try
d = datetime(fu,’InputFormat’,’eee MMM d HH:mm:ss z yyyy’)
catch ME
ME.message
end
Why does TimeZone need to be specified if EST is included in the input?
Specifying the TimeZone then results in a warning, though I’m not sure what the "unexpected results" might be.
d = datetime(fu,’InputFormat’,’eee MMM d HH:mm:ss z yyyy’,’TimeZone’,’EST’) datetime, timezone MATLAB Answers — New Questions









