Date keeps changing

Hi experts.
With a newly installed e/os, the date keeps jumping back one month… i still haven’t used a sim card with it, so date is set manually… this happens everytime i restart the phone…

(Before installation i had to artificially change the date in order to make the OEM appear… could that have anything to do with it?)

How do i snap the phone back to the present??

(Samsung s9+)

Thanks

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

Do you have

Settings > System > Advanced > Time and date

switched on, this would allow WiFi to check / correct the date on the phone from time to time.

Other settings available for Time zone, which I think of as fixed with date.

Do you mean ‘use network provided time’?
I’ve been using the phone without a sim card. Is that not feasible?

1 Like

Doh ! Sorry, yes.

I don’t actually know … I don’t know if android contains or allows a hardware clock or a software equivalent [1] … but I was guessing that (even occasional) wifi + use network provided time would keep the device accurate.

If one can run the phone with use network provided time off, then the device must have some mechanism to keep maintain time and date accurate, I would assume.

Must be, right?!
I mean… this happens every time i reboot the phone

Bump…

Searching online all the answers are switching on automatic time…
is it so?
I mean, in that case, what is the manual setting even for?!
Must we always connect to a mobile network?

I fluffed my original question but, are you using WiFi + ‘use network provided time’ ?

Assuming, as per link, most devices don’t have hardware clock, then I would expect time and date to go at Power down, but bounce back at Power up (providing WiFi is active).

The link does mention system time jumping.

Or is something else going on in your case ? Do you have infrequent WiFi ?

Yes, exactly… i reboot phone everyday, but only connect to the www once or twice a week…

If i must connect to wifi, what is the manual setting actually there for?
I’m pretty sure on a previous phone (with e/os) i had it set manually…

And another question: if i connect to wifi or a mobile network, doesn’t that give away my location?

I’ve noticed the phone can’t connect to wifi while the date is wrong. I have to manually change the date for the connection be established in the first place…
So it’s back to square one? The phone can’t run properly without a sim?!
(So much for anonymity)

There are some clues in this link to explore how AOSP deals with time.

There are two main time detection origins configured for use by default in AOSP:

  • Telephony: Uses Network Identity and Time Zone (NITZ) telephony signals.
  • Network: Uses Network Time Protocol (NTP) time servers.

A hardware clock aka Real Time Clock (RTC) does not seem to be mentioned as a thing in this document, but I read here https://www.quora.com/How-do-smartphones-keep-time-Is-it-software-thing-or-hardware-thing saying that they exist(ed). I guess the Google design is “always online” and manufactures find it is a thing they can omit.

Remembering that Linux can get time and date from https://www.ntppool.org/en/, but I see that time is the standard and date is provided to Linux by ntpdate

Looking in App Lounge there are a few apps similar to Time Server, but none seem to do date.

Realistically I cannot see that as a significant risk, but a record of the transaction will exist for a period, but surely not triangulated, and stored ?

A Pinephone might be a better “computer in the pocket” than Android sans SIM

Thank you for your input aibd…
But to be honest i’m reaching very different conclusions:

if I switch off the phone tonight and then reboot tomorrow, or next week or next month, the time will show up correctly, and the date will advance correctly, without any WiFi or network input.

To my mind that means there is some form of internal clock.

Another tell is that the date is always one month back from the current date… which is exactly what I set it to while installing e/os … *

Sure, could be a coincidence, but seems more likely an ‘internal date’ is set at the point of installation.

Perhaps e/os developers can enlighten us?

Perhaps a factory reset? or I could reinstall e/os?

“… a record of the transaction will exist for a period, but surely not triangulated, and stored…" knowing Telco. companies I have my suspicions …

  • (for anyone wondering, changing the date is a workaround for getting the oem unlock to show up)…

Firstly has your phone never had a SIM since /e/OS install ? Would installing a SIM card cancel this “faulty” date ?

Back to the suggestion I gave above “some clues in this link to explore how AOSP deals with time.”

It seems the suggested command adb shell cmd time_detector dump needs replacing with adb shell dumpsys time_detector on my system.

So running the command with a fully connected device running e-1.13-r part of the output is:

 Time change log:
 Telephony suggestion history:
  key idx: 0=0
  val idx: 0=TelephonyTimeSuggestion{mSlotIndex='0', mUtcTime=TimestampedValue{mReferenceTimeMillis=207688889, mValue=1690510774000}, mDebugInfo=[Sending new time suggestion nitzSignal=TimestampedValue{mReferenceTimeMillis=207688889, mValue=NitzData{mOriginalString=23/07/28,02:19:34+04,01, mZoneOffset=3600000, mDstOffset=3600000, mCurrentTimeMillis=1690510774000, mEmulatorHostTimeZone=null}}, reason=handleNitzReceived(TimestampedValue{mReferenceTimeMillis=207688889, mValue=NitzData{mOriginalString=23/07/28,02:19:34+04,01, mZoneOffset=3600000, mDstOffset=3600000, mCurrentTimeMillis=1690510774000, mEmulatorHostTimeZone=null}})]}

I understand public Date (long date) is represented in this output by mValue=1690510774000 I can put this value into this ‘time - date’ converter https://www.timecalculator.net/milliseconds-to-date to get today’s date.

Later edit ! I see also mValue=NitzData{mOriginalString=23/07/28 is also today’s date.

It would be interesting to see your output, preferably with recent input from WiFi.

“has your phone never had a SIM since /e/OS install”.
No, it hasn’t.

Re those commands, where would I run them? Keep in mind i’m not very techie, and installed e using the very easy-installer…

Your PC would need adb obtained by the download of platform tools https://doc.e.foundation/adb.html.

(Guides, (the first a bit over detailed for this job): https://developer.android.com/tools/adb, but the section https://developer.android.com/tools/adb#Enabling may be useful and secondly https://adbshell.com/)

Once you connect your device to the PC you may open a terminal on the PC and change into the platform-tools directory, produced from unzipping the download.

Type the command

adb devices

will establish if you have contact. If you have contact the device will identify itself with its serial number.

To Issue the required shell command now type

adb shell dumpsys time_detector

Still haven’t used a sim card, but did connect to WiFi and switched on ‘use network provided time’

Adb command returns this:

mLastNitzTime=null
mLastSystemClockTimeSet=null
mLastSystemClockTime=null
mLastSystemClockTimeSendNetworkBroadcast=false

I deduce tentatively, from that output, your available time source is taken only “on the fly” and is not used to update the “System clock”.

Two more links at the edge of my understanding

The links do describe testing methods where build.props are altered … but it might turn out that the ROM would need building differently to perform in the way you hope.

Later edit Another test you could do is to acquire time from an installed SIM card, run

adb shell dumpsys time_detector

Does this update the “System clock” ?

Then does the “updated System clock” survive a reboot with SIM removed ?

This topic was automatically closed after 89 days. New replies are no longer allowed.