1 | $ date |
---|
2 | So Jul 1 10:57:41 CEST 2018 |
---|
3 | |
---|
4 | $ cat /etc/timezone |
---|
5 | Europe/Vienna |
---|
6 | |
---|
7 | $ ls -la /etc/localtime |
---|
8 | lrwxrwxrwx 1 root root 33 Mai 19 17:06 /etc/localtime -> /usr/share/zoneinfo/Europe/Vienna |
---|
9 | |
---|
10 | $ zdump -v /etc/localtime | grep 2018 |
---|
11 | /etc/localtime Sun Mar 25 00:59:59 2018 UT = Sun Mar 25 01:59:59 2018 CET isdst=0 gmtoff=3600 |
---|
12 | /etc/localtime Sun Mar 25 01:00:00 2018 UT = Sun Mar 25 03:00:00 2018 CEST isdst=1 gmtoff=7200 |
---|
13 | /etc/localtime Sun Oct 28 00:59:59 2018 UT = Sun Oct 28 02:59:59 2018 CEST isdst=1 gmtoff=7200 |
---|
14 | /etc/localtime Sun Oct 28 01:00:00 2018 UT = Sun Oct 28 02:00:00 2018 CET isdst=0 gmtoff=3600 |
---|
15 | |
---|
16 | $ timedatectl |
---|
17 | Local time: So 2018-07-01 10:59:06 CEST |
---|
18 | Universal time: So 2018-07-01 08:59:06 UTC |
---|
19 | RTC time: So 2018-07-01 08:59:06 |
---|
20 | Time zone: Europe/Vienna (CEST, +0200) |
---|
21 | System clock synchronized: yes |
---|
22 | systemd-timesyncd.service active: yes |
---|
23 | RTC in local TZ: no |
---|
24 | |
---|
25 | |
---|
26 | |
---|
27 | $ date |
---|
28 | So Jul 1 10:57:41 CEST 2018 |
---|
29 | |
---|
30 | with patch: |
---|
31 | $ python2 |
---|
32 | >>> from MythTV import datetime |
---|
33 | >>> import time |
---|
34 | >>> tnow = time.time() |
---|
35 | >>> datetime.fromtimestamp(tnow).strftime("%Y%m%d%H%M%S %z") |
---|
36 | '20180701110458 +0200' |
---|
37 | |
---|
38 | |
---|
39 | without patch: |
---|
40 | $ python2 |
---|
41 | >>> from MythTV import datetime |
---|
42 | >>> import time |
---|
43 | >>> tnow = time.time() |
---|
44 | >>> datetime.fromtimestamp(tnow).strftime("%Y%m%d%H%M%S %z") |
---|
45 | '20180701100955 +0100' |
---|