aboutsummaryrefslogtreecommitdiffstats
path: root/src/editfns.c
diff options
context:
space:
mode:
authorJoakim Verona2011-09-05 10:37:16 +0200
committerJoakim Verona2011-09-05 10:37:16 +0200
commit687faaf59cdf4029b5e8da16965b257592059e37 (patch)
treec19fc758dc421ec1e6619de88d7cd70258927b47 /src/editfns.c
parentd47f8c5baeaa804548a73675077c8e37cdfe5142 (diff)
parentf62bd846552a090f3ba5e136d6d9cdb4c07ed7be (diff)
downloademacs-687faaf59cdf4029b5e8da16965b257592059e37.tar.gz
emacs-687faaf59cdf4029b5e8da16965b257592059e37.zip
upstream
Diffstat (limited to 'src/editfns.c')
-rw-r--r--src/editfns.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 6759016766f..580298c6e7d 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2014,7 +2014,7 @@ the data it can't find. */)
2014 { 2014 {
2015 int offset = tm_diff (t, &gmt); 2015 int offset = tm_diff (t, &gmt);
2016 char *s = 0; 2016 char *s = 0;
2017 char buf[6]; 2017 char buf[sizeof "+00" + INT_STRLEN_BOUND (int)];
2018 2018
2019#ifdef HAVE_TM_ZONE 2019#ifdef HAVE_TM_ZONE
2020 if (t->tm_zone) 2020 if (t->tm_zone)
@@ -2029,7 +2029,8 @@ the data it can't find. */)
2029 if (!s) 2029 if (!s)
2030 { 2030 {
2031 /* No local time zone name is available; use "+-NNNN" instead. */ 2031 /* No local time zone name is available; use "+-NNNN" instead. */
2032 int am = (offset < 0 ? -offset : offset) / 60; 2032 int m = offset / 60;
2033 int am = offset < 0 ? - m : m;
2033 sprintf (buf, "%c%02d%02d", (offset < 0 ? '-' : '+'), am/60, am%60); 2034 sprintf (buf, "%c%02d%02d", (offset < 0 ? '-' : '+'), am/60, am%60);
2034 s = buf; 2035 s = buf;
2035 } 2036 }