hwclock does not accept date in local time
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Raspbian |
New
|
Undecided
|
Unassigned |
Bug Description
hwclock does not accept date in local time as documentation says.
man:
--date=date_string
[...]
The argument must be in local time, even if you keep your Hardware Clock in Coordinated Universal time. See the --utc option.
I have set locale to polish.
$ locale -k LC_TIME
abday="
day="niedziela;
abmon="
mon="styczeń;
am_pm=";"
d_t_fmt="%a, %-d %b %Y, %T"
d_fmt="%d.%m.%Y"
t_fmt="%T"
t_fmt_ampm=""
era=
era_year=""
era_d_fmt=""
alt_digits=
era_d_t_fmt=""
era_t_fmt=""
time-era-
time-era-
week-ndays=7
week-1stday=
week-1stweek=4
first_weekday=2
first_workday=2
cal_direction=1
timezone=""
date_fmt="%a, %-d %b %Y, %T %Z"
time-codeset=
Please note:
d_fmt="%d.%m.%Y"
This is polish local date format.
But:
$ sudo hwclock --localtime --set --date "06 07 2018 08:59"
date: błędna data: „06 07 2018 08:59”
hwclock: The date command issued by hwclock returned unexpected results.
The command was:
date --date="06 07 2018 08:59" +seconds-
The response was:
hwclock: No usable set-to time. Cannot set clock.
"błędna data" means "wrong date" or "wrong date format"