ISO icon indicating copy to clipboard operation
ISO copied to clipboard

Date time does not work

Open bmentink opened this issue 3 years ago • 15 comments

I set my correct time zone during installation, but the Date/Time is incorrect on my installed OS. There does not seem to be any way to correct it, or set to NPT time ..

bmentink avatar Jun 23 '21 02:06 bmentink

Yeah, I have the same problem. Can you please open a Terminal window (click on the desktop and push F4), and type in tzsetup, press enter, follow the instructions, and tell me what the timezone says? It'll say something like 'Pacific/Auckland'.

kettle-7 avatar Jun 23 '21 04:06 kettle-7

Sorry, you need sudo tzsetup, it's different on FreeBSD.

It only just occurred to me that I haven't used the FreeBSD tzsetup yet, but I did everything manually in the installation.

kettle-7 avatar Jun 23 '21 04:06 kettle-7

Hi, I tried running "sudo tzsetup", it did not report the current time zone, rather it directed me to set it up, which I did. I set it to NZST (New zealand standard time), but the time/date in the gui remains the same, I will try logging out and back in again to see if it has changes.

PS: Typing "date" in the terminal shows the same incorrect date ..

bmentink avatar Jun 23 '21 21:06 bmentink

I logged out and back in again, but still no change. It's like NPT is not running, how do I check?

bmentink avatar Jun 23 '21 21:06 bmentink

sudo service ntpdate onestatus
sudo service ntpd onestatus 

probonopd avatar Jun 24 '21 17:06 probonopd

The following quits ntpdate/ntpd and then runs ntpd to sync the time once, then exits:

sudo service ntpdate onestop
sudo service ntpd onestop
sudo ntpd -g -n -d -q

Does this help?

probonopd avatar Jun 24 '21 17:06 probonopd

Wait, did @probonopd merge my localise fix before 0.5?

If so, I regret to inform you that it sets the timezone every boot based not on settings but keyboard layout: english (US) is common in New Zealand but the time zone gets set to New York.

You need to edit localise:

sudo nano /usr/local/sbin/localize

and everywhere it says 'America/New York' you need to change to your timezone, in my case Pacific/Auckland

kettle-7 avatar Jun 24 '21 20:06 kettle-7

@linuxkettle Seems little old New Zealand gets missed out on the timezone settings again ... (I am in NZ as well, so greetings fellow Kiwi) :)

I tried the above and logged out/in but no change, will try re-booting ..

EDIT: Nope, after reboot the same.

@probonopd I tried the ntpdate/ntpd restart commands above, but still nothings, stays stubbornly on NY time Both ntpdate and ntpd services where not started. I can start the ntpd service, but the ntpdate service refuses to start with this error:

sudo service ntpdate onestart 
Setting date via ntp.
24 Jun 17:56:44 ntpdate[6979]: the NTP socket is in use, exiting

EDIT: The above was because I started the ntpd service first. I stopped it and tried starting the ntpdate service and it completed without error. However checking it's status shows it still not running ..

bmentink avatar Jun 24 '21 21:06 bmentink

greetings fellow Kiwi

:~)

Seems little old New Zealand gets missed out on the timezone settings again

Yeah, you really shouldn't need to edit a system program to change the timezone.

We almost need localise to source a configuration file so that you can set a different timezone to your keyboard layout.

kettle-7 avatar Jun 24 '21 22:06 kettle-7

Still no way to set the correct locale, I see others in other threads are having the same issue .. even using LXQT Config to set the locale does not wok ..

bmentink avatar Jun 25 '21 21:06 bmentink

I had to manually set the locale for each of my apps; this might work:

sudo nano /usr/local/sbin/localize

then push Ctrl+M and Ctrl+N so that you can use the mouse to scroll and select, and see the line numbers. Scrolling down, you should see this:

 64 | # Define default values
 65 | default_country = "US"
 66 | default_language = "en"
 67 | default_locale = "%s_%s.UTF-8" % (default_language, default_country)
 68 | default_timezone = "America/New York"

change it to this:

 64 | # Define default values
 65 | default_country = "NZ"
 66 | default_language = "en"
 67 | default_locale = "%s_%s.UTF-8" % (default_language, default_country)
 68 | default_timezone = "Pacific/Auckland"

kettle-7 avatar Jun 25 '21 23:06 kettle-7

If you end up spending a lot of time in nano, you can run

sudo nano /usr/local/etc/nanorc

and mess about with the options.

I've enabled mouse support and line numbers by default, changed the keyboard shortcuts and messed about with colours, so that it looks like this: Foncy Nano

There is a good one included with the source tarball of GNU Nano.

kettle-7 avatar Jun 25 '21 23:06 kettle-7

I had to manually set the locale for each of my apps; this might work:

sudo nano /usr/local/sbin/localize

then push Ctrl+M and Ctrl+N so that you can use the mouse to scroll and select, and see the line numbers. Scrolling down, you should see this:

 64 | # Define default values
 65 | default_country = "US"
 66 | default_language = "en"
 67 | default_locale = "%s_%s.UTF-8" % (default_language, default_country)
 68 | default_timezone = "America/New York"

change it to this:

 64 | # Define default values
 65 | default_country = "NZ"
 66 | default_language = "en"
 67 | default_locale = "%s_%s.UTF-8" % (default_language, default_country)
 68 | default_timezone = "Pacific/Auckland"

Yep I already tried that a few days back, nothing has changed ... you must have done something else that worked if you have correct timezone shown with "date" in the console or GUI top/right of the screen ..

PS: Also, How did you show the Day/Month in the clock on the screen top/right, in that way ?

bmentink avatar Jun 25 '21 23:06 bmentink

How did you show the Day/Month in the clock on the screen top/right, in that way

I'm not entirely sure.

kettle-7 avatar Jun 26 '21 01:06 kettle-7

Maybe a duplicate of January's https://github.com/helloSystem/Utilities/issues/37

grahamperrin avatar Oct 03 '21 17:10 grahamperrin

https://github.com/helloSystem/hello/discussions/406#discussioncomment-4245391

louies0623 avatar Dec 11 '22 14:12 louies0623

https://gist.github.com/mlconnor/1887156 I found this list of date formats for various countries, I hope you can understand that it is very important to have a date and time setting. image

louies0623 avatar Dec 16 '22 13:12 louies0623