WorldTimeAPI.jl is a lightweight Julia package that offers a convenient interface to interact with the WorldTimeAPI. Easily retrieve the current time and date for any specified timezone, or use UTC by default.
julia> ] add WorldTimeAPI
using WorldTimeAPI
# get the current UTC datetime
@show dt_utc = WorldTimeAPI.datetime()
# get the current datetime for New York
@show dt_new_york = WorldTimeAPI.datetime("America/New_York")
# get the current datetime for Los Angeles
@show dt_los_angeles = WorldTimeAPI.datetime("America/Los_Angeles")
Contributions, bug reports, and feature requests are welcome! Feel free to open an issue or submit a pull request.