문제

I'm looking at the "modified_at" field for a task. I see the following "2013-09-25*T*03:55:22.054*Z*"

What does the T & Z stand for? I suspect it stands for the timezone information but I'm not sure how I can use it.

Would appreciate any help.

도움이 되었습니까?

해결책

This is a very standard format to represent combined date and time, known as ISO 8601. If you're parsing the string, the "T" separates the date and time. The Z indicates "zulu time", also known as UTC or Greenwich Mean Time (versus some other time zone).

You shouldn't have to parse the string yourself though - basically every popular programming language has the ability to take this string and turn it into a Date/Time representation appropriate to the language.

javascript: date = new Date("2013-09-25T03:55:22.054Z");

ruby: date = DateTime.iso8601("2013-09-25T03:55:22.054Z");

etc.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top