summaryrefslogtreecommitdiff
path: root/testsuite/date
diff options
context:
space:
mode:
authorAlexey Soloviev2010-12-31 05:21:51 +0100
committerDenys Vlasenko2010-12-31 05:21:51 +0100
commita5d3d3436b16bf6e1a92ed969e171ac812e8f906 (patch)
treea4fe6c805f31f97c445efaa5eb2e8378e7b1540c /testsuite/date
parenta9e25ffa678a357c581b9b7f65a7b2ce1ae2a63e (diff)
downloadbusybox-a5d3d3436b16bf6e1a92ed969e171ac812e8f906.zip
busybox-a5d3d3436b16bf6e1a92ed969e171ac812e8f906.tar.gz
date: preserve isdst value if date is in time_t (unix time) format
Signed-off-by: Alexey Soloviev <EXT-Alexey.Soloviev@nokia.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite/date')
-rw-r--r--testsuite/date/date-@-works13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/date/date-@-works b/testsuite/date/date-@-works
new file mode 100644
index 0000000..03b4c7f
--- /dev/null
+++ b/testsuite/date/date-@-works
@@ -0,0 +1,13 @@
+# Tests for time_t value (unix time format)
+
+# Just before DST switched off
+test x"Sun Oct 31 03:59:59 EEST 2010" = x"`TZ=EET-2EEST,M3.5.0/3,M10.5.0/4 busybox date -d @1288486799`"
+
+# Just after DST switched off
+test x"Sun Oct 31 03:00:01 EET 2010" = x"`TZ=EET-2EEST,M3.5.0/3,M10.5.0/4 busybox date -d @1288486801`"
+
+# Just before DST switched on
+test x"Sun Mar 28 02:59:59 EET 2010" = x"`TZ=EET-2EEST,M3.5.0/3,M10.5.0/4 busybox date -d @1269737999`"
+
+# Just after DST switched on
+test x"Sun Mar 28 04:00:01 EEST 2010" = x"`TZ=EET-2EEST,M3.5.0/3,M10.5.0/4 busybox date -d @1269738001`"