You are not logged in.

#1 2015-01-11 23:44:19

mir91
Banned
Registered: 2013-11-17
Posts: 143

[SOLVED] 'date' accepts CET but not CEST

I can use this to find out what 0.00h CET is in my time zone:

date -d '0:00 CET'

Now I want to find out what 0.00 CEST would be in my time zone, but this doesn't work:

date -d '0:00 CEST'
date: invalid date ‘0:00 CEST’

Edit: Solution is to use MEST or MESZ instead of CEST.

Last edited by mir91 (2015-01-11 23:57:22)

Offline

#2 2015-01-11 23:51:09

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] 'date' accepts CET but not CEST

Wikipedia mentions CEDT and MEST as alternative names for CEST and MEST seems to work. No clue why the more common (AFAIK) CEST is not recognized.

Offline

#3 2015-01-11 23:56:20

mir91
Banned
Registered: 2013-11-17
Posts: 143

Re: [SOLVED] 'date' accepts CET but not CEST

Thanks, CEDT doesn't work but MEST seems to. smile
MESZ apparently works too.

Last edited by mir91 (2015-01-11 23:58:30)

Offline

#4 2015-01-11 23:56:47

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,886
Website

Re: [SOLVED] 'date' accepts CET but not CEST

CEST works here:

$ date -d '0:00 CEST'
Sat 10 Jan 22:00:00 GMT 2015

I wonder if this is a locale thing. I'm using LC_TIME="en_GB.UTF-8".


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2015-01-11 23:58:14

mir91
Banned
Registered: 2013-11-17
Posts: 143

Re: [SOLVED] 'date' accepts CET but not CEST

I'm using the exact same locale. hmm

Offline

#6 2015-01-12 00:08:04

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,886
Website

Re: [SOLVED] 'date' accepts CET but not CEST

Oh well, so much for that theory. tongue


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#7 2015-01-12 00:14:15

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,546
Website

Re: [SOLVED] 'date' accepts CET but not CEST

FWIW, CEST works fine here too.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB