diff options
| author | Erik Naggum | 1996-08-24 21:11:13 +0000 |
|---|---|---|
| committer | Erik Naggum | 1996-08-24 21:11:13 +0000 |
| commit | 085e9fcbb4e7906f9f7e4c424850ea75e0c0ef87 (patch) | |
| tree | 9e82d96e2a36736af417fb91fa1e294b2c6c3841 /src/editfns.c | |
| parent | 51bd1843803b3c794806b1b115a954945e0c72ca (diff) | |
| download | emacs-085e9fcbb4e7906f9f7e4c424850ea75e0c0ef87.tar.gz emacs-085e9fcbb4e7906f9f7e4c424850ea75e0c0ef87.zip | |
(Fencode_time, Fset_time_zone_rule): Use UTC if the zone is t.
Diffstat (limited to 'src/editfns.c')
| -rw-r--r-- | src/editfns.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/editfns.c b/src/editfns.c index f705b34cbd0..88d8841a06d 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -711,7 +711,7 @@ DEFUN ("encode-time", Fencode_time, Sencode_time, 6, MANY, 0, | |||
| 711 | "Convert SECOND, MINUTE, HOUR, DAY, MONTH, YEAR and ZONE to internal time.\n\ | 711 | "Convert SECOND, MINUTE, HOUR, DAY, MONTH, YEAR and ZONE to internal time.\n\ |
| 712 | This is the reverse operation of `decode-time', which see.\n\ | 712 | This is the reverse operation of `decode-time', which see.\n\ |
| 713 | ZONE defaults to the current time zone rule. This can\n\ | 713 | ZONE defaults to the current time zone rule. This can\n\ |
| 714 | be a string (as from `set-time-zone-rule'), or it can be a list\n\ | 714 | be a string or t (as from `set-time-zone-rule'), or it can be a list\n\ |
| 715 | (as from `current-time-zone') or an integer (as from `decode-time')\n\ | 715 | (as from `current-time-zone') or an integer (as from `decode-time')\n\ |
| 716 | applied without consideration for daylight savings time.\n\ | 716 | applied without consideration for daylight savings time.\n\ |
| 717 | \n\ | 717 | \n\ |
| @@ -757,7 +757,9 @@ If you want them to stand for years in this century, you must do that yourself." | |||
| 757 | char *tzstring; | 757 | char *tzstring; |
| 758 | char **oldenv = environ, **newenv; | 758 | char **oldenv = environ, **newenv; |
| 759 | 759 | ||
| 760 | if (STRINGP (zone)) | 760 | if (zone == Qt) |
| 761 | tzstring = "UTC0"; | ||
| 762 | else if (STRINGP (zone)) | ||
| 761 | tzstring = (char *) XSTRING (zone)->data; | 763 | tzstring = (char *) XSTRING (zone)->data; |
| 762 | else if (INTEGERP (zone)) | 764 | else if (INTEGERP (zone)) |
| 763 | { | 765 | { |
| @@ -914,7 +916,8 @@ static char **environbuf; | |||
| 914 | 916 | ||
| 915 | DEFUN ("set-time-zone-rule", Fset_time_zone_rule, Sset_time_zone_rule, 1, 1, 0, | 917 | DEFUN ("set-time-zone-rule", Fset_time_zone_rule, Sset_time_zone_rule, 1, 1, 0, |
| 916 | "Set the local time zone using TZ, a string specifying a time zone rule.\n\ | 918 | "Set the local time zone using TZ, a string specifying a time zone rule.\n\ |
| 917 | If TZ is nil, use implementation-defined default time zone information.") | 919 | If TZ is nil, use implementation-defined default time zone information.\n\ |
| 920 | If TZ is t, use Universal Time.") | ||
| 918 | (tz) | 921 | (tz) |
| 919 | Lisp_Object tz; | 922 | Lisp_Object tz; |
| 920 | { | 923 | { |
| @@ -922,6 +925,8 @@ If TZ is nil, use implementation-defined default time zone information.") | |||
| 922 | 925 | ||
| 923 | if (NILP (tz)) | 926 | if (NILP (tz)) |
| 924 | tzstring = 0; | 927 | tzstring = 0; |
| 928 | else if (tz == Qt) | ||
| 929 | tzstring = "UTC0"; | ||
| 925 | else | 930 | else |
| 926 | { | 931 | { |
| 927 | CHECK_STRING (tz, 0); | 932 | CHECK_STRING (tz, 0); |