1

Here I have a timestamp:20160322T192202

I read from this question

What exactly does the T and Z mean in timestamp?

But here the timestamp I have gotten doesn't have 'Z' at the end. 'Z' refers to "Zulu". Zulu" is the ICAO spelling alphabet code word for "Z"

I don't know what timezone it belongs to. And don't know how to convert the time.

In this case, can I take this timestamp as 20160322T192202Z?

Community
  • 1
  • 1
dotslash
  • 387
  • 5
  • 13
  • where did you get the timestamp from? – Luis F Hernandez Mar 24 '16 at 07:37
  • A server/API in the U.S. That's all I know. – dotslash Mar 24 '16 at 07:41
  • 1
    The letter "T" in ISO-8601-specification just describes that the following part is a clock time. It has nothing to do with a timezone offset which is either marked by "Z" (for UTC+00) or by a format like "-0400" or "+05:30". So a format without timezone offset but with date, letter "T" and clock time is a plain timestamp without timezone offset. Such timestamps can only be reasonably used in a local context, but not mark an universally valid moment. If you need a moment but don't have a zone offset then you have to infer it from context, for ex. asking for the intention of the supplier. – Meno Hochschild Mar 24 '16 at 08:32
  • Thank you @MenoHochschild I understand it now. So much! – dotslash Mar 24 '16 at 08:46

1 Answers1

1

It realistically should say in the server/API documentation what time zone the timestamp is in. An easy way would be to test the timestamp, as in make the API generate a timestamp and then see what time it is at the moment. This would make sure that you know what timezone it's timestamping in. In any case, it's probably safe to assume you can take it as 20160322T192202Z because UTC is pretty common for things.

Luis F Hernandez
  • 891
  • 2
  • 14
  • 29
  • I take the advice of @Meno . I asked the supplier of this timestamp. See what timezone it should be. Your advice is also very helpful. Thank you! – dotslash Mar 24 '16 at 08:48