Look Up Time Zones of Point Coordinates
Overview
Input latitude and longitude values or an 'sf/sfc' POINT object and get back the time zone in which they exist. Two methods are implemented. One is very fast and uses 'Rcpp' in conjunction with data from the 'Javascript' library (https://github.com/darkskyapp/tz-lookup-oss/). This method also works outside of countries' borders and in international waters, however speed comes at the cost of accuracy - near time zone borders away from populated centres there is a chance that it will return the incorrect time zone. The other method is slower but more accurate - it uses the 'sf' package to intersect points with a detailed map of time zones from here: https://github.com/evansiroky/timezone-boundary-builder/. The package also contains several utility functions for helping to understand and visualize time zones, such as listing of world time zones, including information about daylight savings times and their offsets from UTC. You can also plot a time zone to visualize the UTC offset over a year and when daylight savings times are in effect.
This is a maintenance release, with no new features. The rgdal package was
removed as a Suggested package, as it has been archived on CRAN.
From NEWS.md in the release
Install
Health
ERRORexamplesr-devel-windows-x86_64
Running examples in 'lutz-Ex.R' failed
The error most likely occurred in:
> ### Name: tz_plot
> ### Title: Plot a time zone
> ### Aliases: tz_plot
>
> ### ** Examples
>
> tz_plot("America/Vancouver")
Error in C_force_tz(to_posixct(time), tz, roll_dst) :
CCTZ: Unrecognized output timezone: "America/Vancouver"
Calls: tz_plot ... <Anonymous> -> .force_tz -> from_posixct -> C_force_tz
Execution haltedERRORtestsr-devel-windows-x86_64
Running 'testthat.R' [52s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(lutz)
>
> test_check("lutz")
Saving _problems/test-olson-8.R
Saving _problems/test-olson-14.R
[ FAIL 2 | WARN 0 | SKIP 0 | PASS 1079 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-olson.R:8:3'): tz_plot works ───────────────────────────────────
Error in `C_force_tz(to_posixct(time), tz, roll_dst)`: CCTZ: Unrecognized output timezone: "America/Vancouver"
Backtrace:
▆
1. ├─testthat::expect_is(tz_plot("America/Vancouver"), "ggplot") at test-olson.R:8:3
2. │ └─testthat::quasi_label(enquo(object), label)
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─lutz::tz_plot("America/Vancouver")
5. └─lutz::tz_offset(date_seq, tz)
6. ├─lubridate::force_tz(as.POSIXlt(dt), tz)
7. └─lubridate:::force_tz.default(as.POSIXlt(dt), tz)
8. └─timechange:
...[truncated]...
)
10. ├─timechange:::from_posixct(...)
11. └─timechange:::C_force_tz(to_posixct(time), tz, roll_dst)
── Error ('test-olson.R:14:3'): tz_offset works ────────────────────────────────
Error in `C_force_tz(to_posixct(time), tz, roll_dst)`: CCTZ: Unrecognized output timezone: "America/Vancouver"
Backtrace:
▆
1. ├─testthat::expect_is(...) at test-olson.R:14:3
2. │ └─testthat::quasi_label(enquo(object), label)
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─lutz::tz_offset(Sys.Date(), "America/Vancouver")
5. ├─lubridate::force_tz(as.POSIXlt(dt), tz)
6. └─lubridate:::force_tz.default(as.POSIXlt(dt), tz)
7. └─timechange::time_force_tz(...)
8. └─timechange:::.force_tz(time, tz, tzout, roll_dst)
9. ├─timechange:::from_posixct(...)
10. └─timechange:::C_force_tz(to_posixct(time), tz, roll_dst)
[ FAIL 2 | WARN 0 | SKIP 0 | PASS 1079 ]
Error:
! Test failures.
Execution halted- ERROR12 OK, 1 ERROR2026-09-18
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK12 OK2026-04-25
- NOTE11 OK, 3 NOTE2026-04-22
Show 2 earlier changesHide 2 earlier changes
- ERROR10 OK, 3 NOTE, 1 ERROR2026-04-18
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 6 (1 internal)includes a package overview page
- Examples that run
- 100%4 run in a plain check
- Exported functions with examples
- 80%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 86%
- Median days to close, 50 most recently updated closed issues
- 71
- Median days to close, 50 most recently updated closed PRs
- 1
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
13 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/ateucher/lutz on 2026-10-22.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2023-10-17 · The repository has a site deploy workflow
pkgdown site last built 2023-10-17
Show all practicesHide 2 practices
Dependencies
Installing lutz adds 5 packages (3 with compiled code, 2.6 MB of source tarballs). Heaviest: Rcpp 1.8 MB, lubridate 420 KB, cpp11 298 KB.
Show all 13 packagesHide all 13 packages
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 0.3.2Latest
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- 0.3.12019-07-20 · diff ↗
- 0.3.0
- RR 3.6.0 released · 2019-04-26
- 0.2.02018-06-24 · diff ↗
- RR 3.5.0 released · 2018-04-23
- 0.1.02018-02-07
- RR 3.4.0 released · 2017-04-21
Package metadata
- First published
- 2018-02-07
- Total releases
- 5 / 8 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 3.2
- Download size
- 4.2 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("lutz")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.