Page 3 of 4
Re: New help fixing time from UTC to my local time in Florida
Posted: Wed 17 Apr 2024 9:33 am
by Adrianwx23
rogerthn wrote: ↑Wed 17 Apr 2024 8:22 am
Do you get AM/PM with the command below?
Yes looks like AM there
BUT Still looks like 24hr to me it has a 0 in front of the 5.
It should read 5:30am
Re: New help fixing time from UTC to my local time in Florida
Posted: Wed 17 Apr 2024 10:03 am
by rogerthn
Sorry but I'm not able to find a LC_TIME without leading zero for hour.
Re: New help fixing time from UTC to my local time in Florida
Posted: Wed 17 Apr 2024 10:14 am
by ConligWX
I'm guessing chatgpt would be your best friend.
a quick find there gives some help.
If you want to permanently change the system's time format, you'll need to adjust the locale settings or the system clock format settings. Here's a general approach to change the system-wide time format on a Raspberry Pi:
Locale Configuration:
You can change the locale settings to a locale that uses the 12-hour time format.
Edit the locale configuration file:
Find the line with the desired locale and uncomment it. For example, uncomment the en_US.UTF-8 UTF-8 line.
Then, generate the locale:
Finally, set the system's default locale:
Code: Select all
sudo update-locale LANG=en_US.UTF-8
System Clock Format:
To change the system clock format, you can use the timedatectl command:
Code: Select all
sudo timedatectl set-time-format 12-hour
This command sets the system's clock format to 12-hour. To revert back to 24-hour format, you can use:
Code: Select all
sudo timedatectl set-time-format 24-hour
After making these changes, you may need to restart the system or log out and log back in for the changes to take effect.
Remember to choose the approach that best suits your needs and preferences!
I cant say what will work for you but it maybe a trial and error approach. remember give ChatGPT as much information as possible with your circumstances and therefore the answer should work without more questions being answered.
Re: New help fixing time from UTC to my local time in Florida
Posted: Wed 17 Apr 2024 11:02 am
by Adrianwx23
ConligWX wrote: ↑Wed 17 Apr 2024 10:14 am
I'm guessing chatgpt would be your best friend.
a quick find there gives some help.
If you want to permanently change the system's time format, you'll need to adjust the locale settings or the system clock format settings. Here's a general approach to change the system-wide time format on a Raspberry Pi:
Locale Configuration:
You can change the locale settings to a locale that uses the 12-hour time format.
Edit the locale configuration file:
Find the line with the desired locale and uncomment it. For example, uncomment the en_US.UTF-8 UTF-8 line.
Then, generate the locale:
Finally, set the system's default locale:
Code: Select all
sudo update-locale LANG=en_US.UTF-8
System Clock Format:
To change the system clock format, you can use the timedatectl command:
Code: Select all
sudo timedatectl set-time-format 12-hour
This command sets the system's clock format to 12-hour. To revert back to 24-hour format, you can use:
Code: Select all
sudo timedatectl set-time-format 24-hour
After making these changes, you may need to restart the system or log out and log back in for the changes to take effect.
Remember to choose the approach that best suits your needs and preferences!
I cant say what will work for you but it maybe a trial and error approach. remember give ChatGPT as much information as possible with your circumstances and therefore the answer should work without more questions being answered.
Can you please post the exact commands i would need to enter to get 12hr AM PM time here in florida it's 6:59am. I don't understand what you mean by "uncommon" . My apologies for all the questions juts trying to get this fixed once and for all. Appreciate all the help.
Re: New help fixing time from UTC to my local time in Florida
Posted: Wed 17 Apr 2024 11:20 am
by rogerthn
Adrianwx23 wrote: ↑Wed 17 Apr 2024 11:02 am
Can you please post the exact commands i would need to enter to get 12hr AM PM time here in florida it's 6:59am. I don't understand what you mean by "uncommon" . My apologies for all the questions juts trying to get this fixed once and for all. Appreciate all the help.
Please try
Code: Select all
sudo sed -i 's/%I/%l/g' /usr/share/i18n/locales/en_US
Then try
Next step would be to change default
Re: New help fixing time from UTC to my local time in Florida
Posted: Wed 17 Apr 2024 12:53 pm
by Adrianwx23
rogerthn wrote: ↑Wed 17 Apr 2024 11:20 am
Adrianwx23 wrote: ↑Wed 17 Apr 2024 11:02 am
Can you please post the exact commands i would need to enter to get 12hr AM PM time here in florida it's 6:59am. I don't understand what you mean by "uncommon" . My apologies for all the questions juts trying to get this fixed once and for all. Appreciate all the help.
Please try
Code: Select all
sudo sed -i 's/%I/%l/g' /usr/share/i18n/locales/en_US
Then try
Next step would be to change default
Gonna try this now from work after I enter these commands what do I do? Please advise
Really appreciate your help
Re: New help fixing time from UTC to my local time in Florida
Posted: Wed 17 Apr 2024 12:58 pm
by rogerthn
I "need" to see that you are happy with
What you could do before the final step is to show me the contents of your /etc/default/locale i.e.
Re: New help fixing time from UTC to my local time in Florida
Posted: Wed 17 Apr 2024 1:00 pm
by Adrianwx23
rogerthn wrote: ↑Wed 17 Apr 2024 12:58 pm
I "need" to see that you are happy with
What you could do before the final step is to show me the contents of your /etc/default/locale i.e.
Ok standby gonna try those first commands first. appreciate your patience
Re: New help fixing time from UTC to my local time in Florida
Posted: Wed 17 Apr 2024 1:18 pm
by Adrianwx23
Adrianwx23 wrote: ↑Wed 17 Apr 2024 12:53 pm
rogerthn wrote: ↑Wed 17 Apr 2024 11:20 am
Adrianwx23 wrote: ↑Wed 17 Apr 2024 11:02 am
Can you please post the exact commands i would need to enter to get 12hr AM PM time here in florida it's 6:59am. I don't understand what you mean by "uncommon" . My apologies for all the questions juts trying to get this fixed once and for all. Appreciate all the help.
Please try
Code: Select all
sudo sed -i 's/%I/%l/g' /usr/share/i18n/locales/en_US
Then try
Next step would be to change default
Gonna try this now from work after I enter these commands what do I do? Please advise
Really appreciate your help
For this command are there any spaces? It's all together?
sudo sed -i 's/%I/%l/g' /usr/share/i18n/locales/en_US
Re: New help fixing time from UTC to my local time in Florida
Posted: Wed 17 Apr 2024 1:33 pm
by Adrianwx23
Adrianwx23 wrote: ↑Wed 17 Apr 2024 12:53 pm
rogerthn wrote: ↑Wed 17 Apr 2024 11:20 am
Adrianwx23 wrote: ↑Wed 17 Apr 2024 11:02 am
Can you please post the exact commands i would need to enter to get 12hr AM PM time here in florida it's 6:59am. I don't understand what you mean by "uncommon" . My apologies for all the questions juts trying to get this fixed once and for all. Appreciate all the help.
Please try
Code: Select all
sudo sed -i 's/%I/%l/g' /usr/share/i18n/locales/en_US
Then try
Next step would be to change default
Gonna try this now from work after I enter these commands what do I do? Please advise
Really appreciate your help
Says no such file or directory when i enter this command.
sudo sed -i 's/%I/%l/g' /usr/share/i18n/locales/en_US
Re: New help fixing time from UTC to my local time in Florida
Posted: Wed 17 Apr 2024 1:41 pm
by rogerthn
There are spaces.
I normally use SELECT ALL, Copy and Paste.
Screenshot 2024-04-17 154003.png
Re: New help fixing time from UTC to my local time in Florida
Posted: Wed 17 Apr 2024 2:04 pm
by Adrianwx23
rogerthn wrote: ↑Wed 17 Apr 2024 1:41 pm
There are spaces.
I normally use SELECT ALL, Copy and Paste.Screenshot 2024-04-17 154003.png
Re: New help fixing time from UTC to my local time in Florida
Posted: Wed 17 Apr 2024 2:48 pm
by rogerthn
Whoops, your first try did have user and not usr
Screenshot 2024-04-17 164103.png
If
Code: Select all
sudo sed -i 's/%I/%l/g' /usr/share/i18n/locales/en_US
is failing please show me output from the commands below?
and
Re: New help fixing time from UTC to my local time in Florida
Posted: Wed 17 Apr 2024 2:53 pm
by ConligWX
Adrianwx23 wrote: ↑Wed 17 Apr 2024 11:02 am
Can you please post the exact commands i would need to enter to get 12hr AM PM time here in florida it's 6:59am. I don't understand what you mean by "uncommon" . My apologies for all the questions juts trying to get this fixed once and for all. Appreciate all the help.
I never said "uncommon"
do you mean "uncomment"
that means remove the comment tag (usually the #)
so the locale.gen on my server shows the following(part of the file is shown and not all of it).
Code: Select all
en_GB.UTF-8 UTF-8
# en_HK ISO-8859-1
# en_HK.UTF-8 UTF-8
# en_IE ISO-8859-1
# en_IE.UTF-8 UTF-8
# en_IE@euro ISO-8859-15
# en_IL UTF-8
# en_IN UTF-8
# en_NG UTF-8
# en_NZ ISO-8859-1
# en_NZ.UTF-8 UTF-8
# en_PH ISO-8859-1
# en_PH.UTF-8 UTF-8
# en_SC.UTF-8 UTF-8
# en_SG ISO-8859-1
# en_SG.UTF-8 UTF-8
# en_US ISO-8859-1
# en_US.ISO-8859-15 ISO-8859-15
# en_US.UTF-8 UTF-8
as you see "en_GB.UTF-8 UTF-8" is uncommented. it has NO # tag. the # means the line is a comment. if you remove the # on a line, then then line becomes a setting or command.
if you are in florida, then you would set
to
so it is uncommented. no other line should be uncommented except for the locale YOU are wanting. does that make sense?
then carry on with the rest of the commands. or ask ChatGPT.
Re: New help fixing time from UTC to my local time in Florida
Posted: Wed 17 Apr 2024 4:19 pm
by Adrianwx23
rogerthn wrote: ↑Wed 17 Apr 2024 2:48 pm
Whoops, your first try did have user and not usr
Screenshot 2024-04-17 164103.png
If
Code: Select all
sudo sed -i 's/%I/%l/g' /usr/share/i18n/locales/en_US
is failing please show me output from the commands below?
and