• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

xapi-project / xen-api / 10886098319
80%

Build:
DEFAULT BRANCH: master
Ran 16 Sep 2024 02:38PM UTC
Jobs 1
Files 37
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Sep 2024 02:25PM UTC coverage: 78.279%. Remained the same
10886098319

push

github

web-flow
Date: Accept all valid timezones from client, allow sub-second precision (#5950)

The Date module has a very convoluted way to deal with timezones because
of its historic clients. While we can't remove all the issues, we can
remove most of them.
- Dates (timestamps, really) without timezones do not contain a frame of
reference, and hence placing them in the UTC timeline can't be done
accurately in the general case. This means that comparing timestamps
gives incorrect results.
- XMLRPC enforces dates to be encoded in ISO8601format. This means
timestamps can lack a timezone.
- Xapi uses xmlrpc's dates, adding this unfortunate limitation.
- While Date allows these timestamps, it assumes that these are in the
UTC timezone. On top of that, it refuses to process any timestamps that
are in any timezone other than UTC (`Z`)
- The Date module tries really hard to hide the timezone of timestamps
that lack it when printing them. This means that timezoneless timestamps
can persist in the database, for no good reason, as they are treated as
UTC timestamps.
- Host.localtime is the only call that returns timezoneless timestamps,
all the other calls correctly return timestamps in the UTC timezone.
Because the call on purpose does not want to return the current time in
UTC, changing this might break clients not ready to process any
timezone, mainly SDK-built ones
https://github.com/xapi-project/xen-api/pull/5802
- Dates are stored as a tuple of date, hour, minutes, seconds. This has
very limited precision, which might be unexpected.

This PR does the following mitigation / fixes:
- Document all calls with Datetimes as parameters that the timestamps
will be interpreted as UTC ones if they miss the timezone.
- Remove the limitation to process any valid timezone
- Timezoneless timstamps are immediately processed as UTC timestamps, as
refusing these timestamps can break clients.

Issues that the PR does not fix
- Host.localtime produces timestamps without timezones, this ... (continued)

3456 of 4415 relevant lines covered (78.28%)

0.78 hits per line

Jobs
ID Job ID Ran Files Coverage
1 python3.11 - 10886098319.1 16 Sep 2024 02:38PM UTC 37
78.28
GitHub Action Run
Source Files on build 10886098319
  • Tree
  • List 37
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #10886098319
  • 1d326827 on github
  • Prev Build on gh-readonly-queue/master/pr-5987-f20d127cc3f6db92eb2461eb3f3acaf46543f435 (#10884969849)
  • Next Build on master (#10886433113)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc