Skip to content
Health
35/100
poor
  • Security25/25
    No findings
  • Activity0/25
    Last human commit 137 months ago
  • Required by5/25
    0 modules depend on it
  • Maturity5/25
    In 1 Odoo series since 7.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.2 MB
Module directory on disk
Code analysis 1 migration note 0 models 0 views 0 HTTP endpoints

Description

Introduction

This module allows complex timezone operations in domains mimicing python's pytz. The heavy lifting is done by http://momentjs.com/timezone.

It is meant to allow correct filters for 'Today', 'Yesterday' etc.

In addition to implementing a subset of pytz.tzinfo and datetime.astimezone, there's a shortcut called utc_today() which returns the beginning of the day in the current user's time zone translated to UTC, this is equivalent to::

pytz.timezone(tz).localize(datetime.datetime.now().replace(hour=0, minute=0, second=0)).astimezone(pytz.utc)

in python.

Usage

Depend on this module and use filters like::

[('write_date', '>=', utc_today().strftime('%Y-%m-%d %H:%M:%S'))]

which displays records changed in the user's conception of today.

Dependencies

Odoo dependencies
OCA/web:
odoo/odoo:
- web
Python dependencies
None
System dependencies
None
Required by
None

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 0

No views found for this module.

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 0

No models found for this module.