4 thoughts on “[SOLVED] time.time and time zones on 2.7”
Is time.time() supposed to deliver the time in UTC (per the Python docs) or local time with the timezone offset appended? The EasyScript 2.7-r3 does not mention this.
Ping. It seems to be local time but how can we detect and adjust the time reported? Do we have to resort to AT commands?
Given the delay the time.time() method imposes (100ms) I start to sense that the system is already calling the AT engine. Is that correct?
We solved it. The time.time() function uses the same source as the AT engine and is affected by its settings. By configuring the clock to deliver in UTC instead of local time (default) you get the correct behavior from time():
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
Is time.time() supposed to deliver the time in UTC (per the Python docs) or local time with the timezone offset appended? The EasyScript 2.7-r3 does not mention this.
Ping. It seems to be local time but how can we detect and adjust the time reported? Do we have to resort to AT commands?
Given the delay the time.time() method imposes (100ms) I start to sense that the system is already calling the AT engine. Is that correct?
We solved it. The time.time() function uses the same source as the AT engine and is affected by its settings. By configuring the clock to deliver in UTC instead of local time (default) you get the correct behavior from time():
AT#CCLKMODE=1
Thank you Marco!