More extensive time module?

5 thoughts on “More extensive time module?

  1. We would like to be able to get the current time in UTC (gmtime/mktime) and format it in a standard way (ctime), but it seems like the shipped time module only supports delivering the a local time since 2000/1/1. Are there any plans on extending the functionality of the time module in 2.7-equipped devices? If no, can it be solved using AT commands?

     

    Edit: I need to format any timestamp, not just the current time.

  2. Indeed instead keeping my breath I would use AT+(#)CLCK. and format as needed.

     

    To format any timestamp … use a network resource (a service somewhere).

    1. Indeed instead keeping my breath I would use AT+(#)CLCK. and format as needed.

       

      To format any timestamp … use a network resource (a service somewhere).

      I was just reading up about that. Is it safe to overwrite the clock to format an arbitrary timestamp?It does not seem to offer a way of formatting without setting the CCLK value.

  3. Use #NITZ or #NTP to set the clock.

    I don’t need to set the clock 🙂 I need to format two different timestamps in UTC using the ctime format:

    1) Timestamp of a stored configuration

    2) Current modem time

     

    However, it seems like it’s getting too cumbersome for practical use so we’ll see if it would be possible to just send the timestamp as is without formatting. Though then we’ll have the problem of the modem delivering local time, both when using time.time() and AT#CLCK.