Bug 758874 - Time always treated as 24 hours
Summary: Time always treated as 24 hours
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 16
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-30 21:05 UTC by diods
Modified: 2011-12-01 13:41 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-01 13:41:28 UTC
Type: ---


Attachments (Terms of Use)

Description diods 2011-11-30 21:05:46 UTC
Description of problem:
when i change the time from 24 hours to AM/PM using System Settings -> Date and Time, the change take effects only on the top panel of the gnome shell.  

Version-Release number of selected component (if applicable):
2011n-2.fc16

How reproducible:


Steps to Reproduce:
1. System Settings -> Date and Time
2. change 24 hour to AM/PM 
  
Actual results:

the change from 24 hour to AM/PM only take effect on the top panel of the gnome shell.

Expected results:


Additional info:

when i change the time from 24 hour to AM/PM, then open terminal then type :
1- su -
2- nautilus
3- the time changed back to 24 hour in the top panel of gnome shell.
or type :
1- su -
2- shutdown -P "am/pm time"
3- it will schedule the shutdown in the next day.

Comment 1 Petr Machata 2011-12-01 00:46:10 UTC
This has certainly nothing to do with tzdata.  I'm trying to understand what your problem is.  Where else should the AM/PM format change be reflected, and isn't?  What do you expect to happen?

That running nautilus from another account doesn't honor the first user's settings should be expected.  root presumably has his own clock settings.

I don't understand the part with shutdown at all.  What is the actual command line that you are giving, what is the system's response to it, and what are your expectations?

Comment 2 diods 2011-12-01 07:12:15 UTC
ok here is a picture that shows you the problem :

http://img585.imageshack.us/img585/8374/90379997.png

as you can see in the picture the time in both top panel and date and time dialog refer to am/pm but the shutdown command treated the clock as 24 hour. the shutdown command supposed to shutdown the pc at 01:00 PM.

i have tried to change the date and time to am/pm, as gdm, root, and my username but it is still 24 hour.

i know it is a bit confusing but i hope the picture explaine it.

Comment 3 diods 2011-12-01 11:16:18 UTC
here is also another picture which will show you the problem more clearly :

http://img341.imageshack.us/img341/7591/timeissue.png

as you can see in the picture the current date and time display the time in 12h while the boxes display the time in 24h.

Comment 4 Petr Machata 2011-12-01 11:35:19 UTC
Shutdown is an admin, not user-facing tool.  It's not surprising that it ignores gnome settings.  In fact, 24-hour format is mandated in the man page.

Besides, stating simply 1:00 can't work.  Which 1:00?  How should shutdown know?

In the mean time, create a wrapper script that will run some equivalent of shutdown -P $(date -d 2pm +%R).  Or learn 24-hour format, it's not that big of a deal.

Reassigning to systemd, which is the owner of shutdown.

Comment 5 Michal Schmidt 2011-12-01 13:41:28 UTC
Yes, systemd's shutdown implementation supports only the 24-hour time format. So did upstart's and SysVinit's implementations.
Supporting Gnome configuration in /sbin/shutdown is out of the question.


Note You need to log in before you can comment on or make changes to this bug.