MCPcopy Create free account
hub / github.com/ceph/ceph / datetime_now

Function datetime_now

src/python-common/ceph/utils.py:17–23  ·  view source on GitHub ↗

Return the current local date and time. :return: Returns an aware datetime object of the current date and time.

()

Source from the content-addressed store, hash-verified

15
16
17def datetime_now() -> datetime.datetime:
18 """
19 Return the current local date and time.
20 :return: Returns an aware datetime object of the current date
21 and time.
22 """
23 return datetime.datetime.now(tz=datetime.timezone.utc)
24
25
26def datetime_to_str(dt: datetime.datetime) -> str:

Callers 15

TestDevicesEqualityClass · 0.90
test_datetime_now_1Function · 0.90
__init__Method · 0.90
saveMethod · 0.90
rmMethod · 0.90
loadMethod · 0.90
add_settingMethod · 0.90
rm_settingMethod · 0.90
process_settingsMethod · 0.90
add_profileMethod · 0.90
update_host_daemonsMethod · 0.90
update_host_factsMethod · 0.90

Calls 1

nowMethod · 0.45

Tested by 15

test_datetime_now_1Function · 0.72
test_daemon_actionMethod · 0.72
test_remove_osdsMethod · 0.72
test_extra_ceph_confMethod · 0.72
test_migrate_schedulerFunction · 0.72
test_migrate_nfs_initialFunction · 0.72