LinuxForum.Fans
Тема

как преобразовать время из локального в UTC?

Автор: Termo 6 сообщений 4881 просмотров
#146019

а как преобразовать время из локального в UTC?
неправильно показывает часы :(

#146044
Termo написал:
а как преобразовать время из локального в UTC?
неправильно показывает часы :(

Примерно так:
/etc/conf.d/clock

text

# Set CLOCK to "UTC" if your hardware clock is set to UTC (also known as
# Greenwich Mean Time).  If that clock is set to the local time, then 
# set CLOCK to "local".
# Note that if you dual boot with Windows, then you should set it to
# "local" because Windows always sets the hardware clock to local time.

CLOCK="UTC"

# Select the proper timezone. For valid values, peek inside of the # /usr/share/zoneinfo/ directory. For example, some common values are # "America/New_York" or "EST5EDT" or "Europe/Berlin". If you want to # manage /etc/localtime yourself, set this to "".

TIMEZONE="Europe/Minsk"

# If you wish to pass any other arguments to hwclock during bootup, # you may do so here.

CLOCK_OPTS=""

# If you want to set the Hardware Clock to the current System Time (software # clock) during shutdown, then say "yes" here.

CLOCK_SYSTOHC="yes"

### ALPHA SPECIFIC OPTIONS ###

# If your alpha uses the SRM console, set this to "yes". SRM="no"

# If your alpha uses the ARC console, set this to "yes". ARC="no"

#146057
Lupo Alberto написал:
/etc/conf.d/clock

так и есть
однако врет-с!
попробую галку в virtual box снять

#146064

Еще бы конечно лучше бы в для каждой проблемы создавали свою тему а то смотришь разбивка диска а там про время вобще уже идет

#146091

У меня так сделано:
[console]ln -s /usr/share/zoneinfo/Europe/Moscow /etc/localtime[/console]
Файл /etc/conf.d/clock отсутствует, но есть /etc/conf.d/hwclock
и в нем не указан TIMEZONE. Но у меня OpenRC. Я давно уже на него перешел.

Войдите или зарегистрируйтесь, чтобы ответить.