You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some servers export dateTimes as ISO 8601 strings. I don't think the Stata clock() function can parse ISO 8601, but we should be able to modify the string before passing it to clock().
One of the reasons that clock() can't parse ISO 8601 is that clock() doesn't understand time zones, which are an optional part of ISO 8601. A time value can also include a time zone designator. For a time value, I think we can just strip the time zone designator, as Collect doesn't actually allow the user to select a time zone. I'm less sure what to do about dateTime values. Maybe we also strip their time zone designators, but issue a warning? Or maybe we can check whether all dateTime values are in the same time zone, and issue the warning only if they aren't? Alternatively, perhaps we could split the time zone into a separate variable? I doubt we want to implement any actual time zone conversion in Stata...
The text was updated successfully, but these errors were encountered:
matthew-white
changed the title
Support ISO 8601 for dateTimes and times
Support ISO 8601 for dateTime and time values
Jul 24, 2018
Some servers export
dateTimes
as ISO 8601 strings. I don't think the Stataclock()
function can parse ISO 8601, but we should be able to modify the string before passing it toclock()
.One of the reasons that
clock()
can't parse ISO 8601 is thatclock()
doesn't understand time zones, which are an optional part of ISO 8601. Atime
value can also include a time zone designator. For atime
value, I think we can just strip the time zone designator, as Collect doesn't actually allow the user to select a time zone. I'm less sure what to do aboutdateTime
values. Maybe we also strip their time zone designators, but issue a warning? Or maybe we can check whether alldateTime
values are in the same time zone, and issue the warning only if they aren't? Alternatively, perhaps we could split the time zone into a separate variable? I doubt we want to implement any actual time zone conversion in Stata...The text was updated successfully, but these errors were encountered: