Patchwork util: fix doc for datestr()

login
register
mail settings
Submitter Adrian Buehlmann
Date April 8, 2016, 8:23 p.m.
Message ID <59dd920c0ddc4d41da9e.1460147035@kork>
Download mbox | patch
Permalink /patch/14447/
State Accepted
Headers show

Comments

Adrian Buehlmann - April 8, 2016, 8:23 p.m.
# HG changeset patch
# User Adrian Buehlmann <adrian@cadifra.com>
# Date 1460146506 -7200
# Node ID 59dd920c0ddc4d41da9e1bd35eb8f6dd1550a0ce
# Parent  87c6ad2251d8703d7f16d51e99e3d1c040f0be49
util: fix doc for datestr()

timezone parameter was removed with c3182eeb70ea
Augie Fackler - April 9, 2016, 1:42 a.m.
On Fri, Apr 08, 2016 at 10:23:55PM +0200, Adrian Buehlmann wrote:
> # HG changeset patch
> # User Adrian Buehlmann <adrian@cadifra.com>
> # Date 1460146506 -7200
> # Node ID 59dd920c0ddc4d41da9e1bd35eb8f6dd1550a0ce
> # Parent  87c6ad2251d8703d7f16d51e99e3d1c040f0be49
> util: fix doc for datestr()

queued, thanks

>
> timezone parameter was removed with c3182eeb70ea
>
> diff --git a/mercurial/util.py b/mercurial/util.py
> --- a/mercurial/util.py
> +++ b/mercurial/util.py
> @@ -1582,8 +1582,7 @@
>  def datestr(date=None, format='%a %b %d %H:%M:%S %Y %1%2'):
>      """represent a (unixtime, offset) tuple as a localized time.
>      unixtime is seconds since the epoch, and offset is the time zone's
> -    number of seconds away from UTC. if timezone is false, do not
> -    append time zone to string."""
> +    number of seconds away from UTC."""
>      t, tz = date or makedate()
>      if "%1" in format or "%2" in format or "%z" in format:
>          sign = (tz > 0) and "-" or "+"
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -1582,8 +1582,7 @@ 
 def datestr(date=None, format='%a %b %d %H:%M:%S %Y %1%2'):
     """represent a (unixtime, offset) tuple as a localized time.
     unixtime is seconds since the epoch, and offset is the time zone's
-    number of seconds away from UTC. if timezone is false, do not
-    append time zone to string."""
+    number of seconds away from UTC."""
     t, tz = date or makedate()
     if "%1" in format or "%2" in format or "%z" in format:
         sign = (tz > 0) and "-" or "+"