laboneq.workflow.timestamps
¶
Timestamps functions for LabOne Q workflows.
local_date_stamp(dt=None)
¶
Returns a string formatted date stamp in the local timezone.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dt
|
datetime | None
|
The time use. If None, the current time is used. |
None
|
Returns:
Type | Description |
---|---|
str
|
THe datetime formatted as '%Y%m%d'. |
Note
This function is used by the FolderStore
to generate the
date stamp used in the names of the per-day subfolders it
creates.
local_now(dt=None)
¶
local_timestamp(dt=None)
¶
Returns a string formatted timestamp in the local timezone.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dt
|
datetime | None
|
The time use. If None, the current time is used. |
None
|
Returns:
Type | Description |
---|---|
str
|
The datetime formatted as '%Y%m%dT%H%M%S'. |
Note
This function is used by the FolderStore
to generate the
timestamp used in the names of the logbook folders it creates.
utc_now(timestamp=None)
¶
Returns the given timestamp or the current time.
Uses UTC timezone.