time_zone_info v0.3.0 TimeZoneInfo.Worker View Source

Holds the state for TimeZoneInfo and starts the initial update and when configured the automatic updates.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Returns the tuple {:next, datetime} where datetime is the date time for the next update. If datetime is nil no update process is started.

Starts a worker for TimeZoneInfo.

Returns the state of the worker.

Runs the update process. This will also run at start up for the initialisation of TimeZoneInfo. This function returns the same as state/0.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

next(server \\ __MODULE__)

View Source

Returns the tuple {:next, datetime} where datetime is the date time for the next update. If datetime is nil no update process is started.

Starts a worker for TimeZoneInfo.

Link to this function

state(server \\ __MODULE__)

View Source

Returns the state of the worker.

Possible return values are:

  • :ok: TimeZoneInfo is initialised and the update process is disabled.
  • {:next, milliseconds}: TimeZoneInfo is initialised and the next update runs after milliseconds.
  • {:error, reason}
Link to this function

update(server \\ __MODULE__, opt)

View Source

Runs the update process. This will also run at start up for the initialisation of TimeZoneInfo. This function returns the same as state/0.