Library for HTTP Time

When I send data to pachube, there is an HTTP response like:

  HTTP/1.1 200 OK
  Date: Thu, 01 Mar 2012 22:03:10 GMT
  Content-Type: text/plain; charset=utf-8
  Connection: close
  X-Pachube-Logging-Key: logging.Lo55opRx5dl5UwAw2N
  X-PachubeRequestId: 0fc432c4685ffe94d8208d0afc4d2
  Cache-Control: max-age=0
  Content-Length: 1
  

You could take the 2nd line  and get the time and date info out of it.  Is there a library like the real time clock (RTClib.h) around that takes this text and provides data and time functionality from it?

 

 

glyn.hudson's picture

Re: Library for HTTP Time

Hi Scott, 

We have implemented exactly that on the emonBase/NanodeRF. We have used it in conjunction with the JeeLabs RTC library implemented in software. The emonBase sends the current time from the server to the emonGLCD every 10's. 

Here's a blog post about it: http://openenergymonitor.blogspot.com/2012/01/emonglcd-getting-time-for-internet.html

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.