aboutsummaryrefslogtreecommitdiffstats
path: root/src/editfns.c
diff options
context:
space:
mode:
authorPaul Eggert2011-09-05 13:43:14 -0700
committerPaul Eggert2011-09-05 13:43:14 -0700
commit1dc4aa6d975c9f92cd5c0d0baf5eae89e013fd67 (patch)
tree8c3e07779650c446922a93839c3ecdabb85cdaea /src/editfns.c
parentf4af5137d41b5ff71771028385f89be889dd1315 (diff)
parent697210c4822d4e7be9a81234d2026e5ace724a90 (diff)
downloademacs-1dc4aa6d975c9f92cd5c0d0baf5eae89e013fd67.tar.gz
emacs-1dc4aa6d975c9f92cd5c0d0baf5eae89e013fd67.zip
Merge from trunk.
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 }