Zulu Time

DanielLim
Community Explorer

I have been naive about how date-times are represented in Canvas and I got frustrated trying to reconcile assignment due dates with grading period start and end dates. I failed to notice that some date-times end with a 'Z'. Using the REST API I pulled the following end date from one of our grading periods:

2022-10-01T09:59:59Z

Here is the same information pulled from the GraphQL API:

2022-09-30T23:59:59-10:00

Notice that the first date-time is October 1 and the following date-time is September 30. This made a huge difference for me because I basically thought I could ignore everything after the 'T'. Turns out the 'Z' at the end of the first date-time is Zulu Time and is UTC-0. So these are the exact same date-times represented in two different ways.

What was confusing for me is that the REST and GraphQL APIs reported date-times in different formats (at least for me). Be warned!

Labels (2)