A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-February/116495.html below:

[Python-Dev] How to round timestamps and durations?

[Python-Dev] How to round timestamps and durations? [Python-Dev] How to round timestamps and durations?Georg Brandl g.brandl at gmx.net
Wed Feb 15 08:42:02 CET 2012
Am 13.02.2012 13:59, schrieb Victor Stinner:
> Hi,
> 
> My work on the PEP 410 tries to unify the code to manipulate
> timestamps. The problem is that I'm unable to decide how to round
> these numbers.
> 
> Functions using a resolution of 1 second (e.g. time.mktime) expects
> rounding towards zero (ROUND_HALF_DOWN), as does int(float). Example:

FWIW, that's ROUND_DOWN.  ROUND_HALF_DOWN rounds up from > x.5.

Georg

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4