observation_time not equal to observation_epoch

  • 1
  • Problem
  • Updated 7 years ago
I just made a sample API call and the 'observation_time' does not equal to
'observation_epoch'. I am making the call from 'PDT' or '-0700' for a location in 'CDT'. Here is the results:
"observation_time":"Last Updated on October 9, 1:40 AM CDT",
"observation_time_rfc822":"Wed, 09 Oct 2013 01:40:20 -0500",
"local_time_rfc822":"Wed, 09 Oct 2013 01:40:24 -0500",
If I convert the "observation_epoch":"1381300820", I get '2013-10-08 23:40:20'. This giving my local time (-0700) not the observation time (-0500). Any idea what could be happening?
Photo of GLASA


  • 1 Post
  • 0 Reply Likes

Posted 7 years ago

  • 1
Photo of WunderWilliam


  • 267 Posts
  • 18 Reply Likes
Epoch is always in UTC. If you're looking at a converter, it might be showing your local timezone for your own convenience.

The API data might make more sense if I explain the difference between the observation_time and local_time:

The observation time shows when the current conditions were observed (in the timezone of the place queried), while the local time is when the request was made (also in the timezone of the place queried).

These two will often be close, but if you use a station that reports only hourly, then the difference is much more clear: