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.
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).
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.
Use #NITZ or #NTP to set the clock.
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.
We use cookies to enhance your browsing experience and help us improve our websites. To improve our website, we carefully select third parties that use cookies to allow us to serve specific content and achieve the purposes set out in our cookie policy. For more information on how to make adjustments through your browser to the cookies being used on your device, please click Find Out More link. By closing this banner or continuing to browse our website, you agree to our use of such cookies. FIND OUT MORE
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.
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.
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.