From e51d8ac39e67fdbd5ce26c024f1a85497dc7bc86 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Mon, 4 Oct 2010 22:42:31 +0200 Subject: date: turn time widget argument into an offset The os.time() call should not be passed as an argument it self, because of a chance it will be stored internally and so we would always get the same time. Instead we can pass time offsets in seconds, i.e. to go 6 hours forward we can use the widget argument 21600, to go 6 hours back we use -21600 instead. --- README | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'README') diff --git a/README b/README index f135209..c038eaf 100644 --- a/README +++ b/README @@ -266,9 +266,10 @@ vicious.widgets.weather vicious.widgets.date - provides access to os.date, with optional time formatting provided - as the format string - - takes optional time as an argument, for example to calculate - time-zone differences, otherwise it formats the current time + as the format string - using regular date sequences + - takes optional time offset, in seconds, as an argument for example + to calculate time zone differences, otherwise current time is + formatted - returns the output of os.date(), formatted by provided sequences -- cgit v1.2.3