Exqute v0.1.2 Exqute.Utils.Time View Source
Time utilities for the Exqute app
Link to this section Summary
Functions
Get the configured Time Zone information
What time is it now?
Scales the specified duration in the test environment mainly.
Returns the timezone if it is valid, or the default configured zone
Link to this section Functions
Get the configured Time Zone information
iex> Exqute.Utils.Time.configured_zone
"UTC"
What time is it now?
Scales the specified duration in the test environment mainly.
Returns the timezone if it is valid, or the default configured zone
iex> Exqute.Utils.Time.with_zone_or_default("*")
{:ok, "UTC", "No zone detected"}
iex> Exqute.Utils.Time.with_zone_or_default("Asia/Kolkata")
{:ok, "Asia/Kolkata", "Zone exists"}
iex> Exqute.Utils.Time.with_zone_or_default("Marvel/Asgard")
{:error, "UTC", "Invalid zone"}