Skip to content

Commit

Permalink
update tzdata
Browse files Browse the repository at this point in the history
  • Loading branch information
roelandvanbatenburg committed Sep 19, 2024
1 parent c45b9a7 commit 3945fb9
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 3 deletions.
48 changes: 46 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Updated `Timex.now/1` typespec to remove the `AmbiguousDateTime`
- Corrected pluralization rules for bg/cs/he/id/ro/ru
- Fixed documentation formatting of `Timex.TimezoneInfo.create/6`
- Updated tzdata to fix issues with 2024b

---

Expand Down Expand Up @@ -74,16 +75,21 @@ aligns with the C strftime specification (i.e. Monday is 1..7, Sunday is 0..6)
## 3.7.3

**NOTE:** The config of the Timex default locale is changed to:

```ex
config :your_app, Timex.Gettext, default_locale: "en"
```

This follows the standard set by Gettext, see: [the Gettext docs](https://hexdocs.pm/gettext/Gettext.html#module-default-locale)

Now when the Gettext locale is being changed on runtime with:

```ex
Gettext.put_locale("nl")
```

The Gettext backend for Timex will follow suit. If for some reason you want Timex, and just Timex, to change its locale to something else you should target the Timex.Gettext backend with:

```ex
Timex.Gettext.put_locale("de")
```
Expand Down Expand Up @@ -161,9 +167,11 @@ modified to remove the direct dependency.
- `Timex.Duration.to_string/1` now returns `PT0S` instead of `P` for zero-length durations with the default formatter

### Added

- `Timex.set/2` now also accepts setting the `:date` from a `%Date{}` and `:time` from a `%Time{}` struct for NaiveDateTime

### Fixes

- Loosen `tzdata` dependency to allow `1.x` releases

## 3.6.3
Expand Down Expand Up @@ -236,12 +244,13 @@ modified to remove the direct dependency.
## 3.4.1

### Added

- Afrikaans translations (Julian Dicks)
- The :inclusive option for Timex.between?/4 :start and :end in addition to true

### Fixed
- strftime_iso_kitchen no longer discards dates

- strftime_iso_kitchen no longer discards dates

## 3.4.0

Expand All @@ -261,7 +270,6 @@ documented behavior, then these are _not_ breaking changes.
- Intervals could be created with invalid from/until (i.e. creating an interval with an until before the from)
- Interval documentation improvements for clarity


## 3.1.13

### Added
Expand Down Expand Up @@ -371,17 +379,20 @@ The list of these changes will be comprehensively spelled out below, along with
of removals.

### Fixed

- [#185](https://github.com/bitwalker/timex/issues/185)
- [#137](https://github.com/bitwalker/timex/issues/137)

### Added

- `Timex.Protocol` (defines the API all calendar types must implement to be used with Timex)
- `compare/3`, `diff/3` `shift/2`, now allow the use of `:milliseconds` and `:microseconds`
- `set/2` now allow the use of `:microsecond`
- `Timex.Duration`
- `to_gregorian_microseconds/1`, converts a date/time value to microseconds since year zero

### Changed

- Timex's old Date/DateTime types are replaced by Elixir 1.3's new calendar types,
NaiveDateTime is now used where appropriate, and AmbiguousDateTime remains in order to
handle timezone ambiguities.
Expand All @@ -397,6 +408,7 @@ of removals.
- Renamed `to_erlang_datetime` to `to_erl`

### Removed

- Timex.Date (use `Timex` now)
- Timex.DateTime (use `Timex` now)
- Timex.Convertable (no longer makes sense in the face of differentiating NaiveDateTime/DateTime)
Expand All @@ -411,6 +423,7 @@ of removals.
## 2.1.3

### Fixed

- Some behaviour around shifting across DST boundaries was behaving incorrectly (#142)

## 2.1.2
Expand All @@ -424,6 +437,7 @@ config :timex, default_locale: "ru" # or whatever locale you want
```

### Added

- The ability to configure a default locale (the default is "en" if no config is provided) for formatting/translation of strings
- The ability to format a string using a given locale, otherwise the default locale is used
- Translations for the "ru" locale, more to come
Expand All @@ -439,21 +453,29 @@ config :timex, default_locale: "ru" # or whatever locale you want
- Two Convertables, which returns the relative time between the first date/time value, and the reference date (provided as the 2nd)
- Two variants of the above which also take a locale as the last argument, and results in the string being translated to that locale
- Added ASN.1 parsing/formatting support

### Changed

- All functions which return strings, and all formatting functions, will use the default locale for translation, which is "en" unless another was configured, or one was provided if the function takes a locale as an argument.

### Fixed

- Milliseconds should be able to be fractional - the is_millisecond guard was only allowing integers

## 2.1.1

### Added

- Implementations of the Inspect protocol for Date, DateTime, AmbiguousDateTime, TimezoneInfo, and AmbiguousTimezoneInfo

### Changed

- When inspecting any Timex types, the compact view will be used, pass structs: false to view the raw data structures if needed.

## 2.1.0

### Added

- Two new protocols, `Timex.Comparable` and `Timex.Convertable`, implementing these two for your own date/time types
will allow you to use the Timex API with your own types, just be aware that only Dates, DateTimes, or AmbiguousDateTimes
will be returned as date/time representations, but it should be trivial to add a function in your implementation to
Expand All @@ -462,7 +484,9 @@ config :timex, default_locale: "ru" # or whatever locale you want
`Timex.to_julian/1`, you can also get the day of the week number for a Julian date, via `Timex.Calendar.Julian`
- `to_julian` function to the `Timex.Convertable` protocol
- `Timex.timezones` to get a list of all valid timezones

### Changed

- **POTENTIALLY BREAKING** The `{Zname}` format token was formatting with the abbreviation, which is incorrect. It
has been changed to format with the full name, use `{Zabbr}` if you want the abbreviation.
- Moved comparison and diffing behaviour into a new protocol, `Timex.Comparable`, which allows you to now
Expand All @@ -474,7 +498,9 @@ config :timex, default_locale: "ru" # or whatever locale you want
DateTime-like keys (i.e. year/month/day/hour/minute/etc.) as strings or atoms, or any Date-like keys (year/month/day),
as strings or atoms. The latter will accept only two atoms which represent Dates/DateTimes right now, :epoch, and :zero.
- Modified `Timex.Comparable` to take any `Timex.Convertable`

## Fixed

- A number of performance enhancements due to refactoring for `Convertable` and `Comparable`, particularly with diffing
- The `%Z` strftime format token was formatting timezones as abbreviations, which is not round-trippable due to timezone
ambiguity. This token now formats using the full timezone name, which is valid according to the strftime standard.
Expand All @@ -487,6 +513,7 @@ and the compiler will catch almost all of them. See the Migrating section of the
to 2.0

### Added

- New `Date` type, which is basically the same as `DateTime`, but without time/timezone, which works with
most all API functions that work with DateTimes, except those which are specific to time or timezones.
Functions which take a Date or DateTime and options which can manipulate both date and time properties,
Expand All @@ -508,7 +535,9 @@ to 2.0
- week_of_month/1 and /3 to get the week index of the month a date occurs in
- `Timex.diff(this, other, :calendar_weeks)` - get the diff between two dates in terms of weeks on the calendar,
in other words, the diff is done based on the start of the earliest date's week, and the end of the latest date's week

### Changed

- **BREAKING** All non-bang functions in the API now return error tuples of the form `{:error, term}` instead of raising exceptions
- **BREAKING** All DateTime-related APIs can now return an `AmbiguousDateTime`, which must be handled by choosing which DateTime to use.
- **BREAKING** All Timezone lookups can now return an `AmbiguousTimezoneInfo` struct, which must be handled by choosing which TimezoneInfo to use.
Expand All @@ -519,14 +548,20 @@ to 2.0
API exposed in the Date and DateTime modules. It is recommended to use Timex though.
- **BREAKING** Renamed Timex.Date.Convert to Timex.Convertable
- **BREAKING** `diff/3` now returns the same value no matter which order the arguments are given. Use `compare/3` to get the ordering

### Deprecated

- `Timex.from` (old `Date.from`) variants. Use `Timex.date`, `Timex.datetime`, `Date.from_<type>`, or `DateTime.from_<type>` instead.
- `DateTime.from`. Use `Timex.datetime`, `DateTime.from_erl`, `DateTime.from_<type>`
- `to_usecs`, `to_msecs`, `to_secs`, and `to_mins` in favor of `to_microseconds`, `to_milliseconds`, `to_seconds`, and `to_minutes`
- Abbreviated unit names like `secs` or `mins`, `sec` or `min`, in favor of their full names (i.e. `seconds`, `minutes`, etc.)

### Removed

- DateConvert/DateFormat aliases

### Fixed

- Shifting datetimes is now far more accurate than it was previously, and handles timezone changes, ambiguous timezone periods, and non-existent time periods (such as those during a timezone change like DST).
- Diffing by weeks, months, and years is now much more precise
- Humanized Time formatter now pluralizes units correctly
Expand All @@ -538,16 +573,25 @@ for example, CEST, you will need to update your code to manually map that abbrev
name. Timezone abbreviations are only supported if they are POSIX timezones in the Olson timezone database.

### Added

- Added CHANGELOG
- Add Date.from clause to handle Phoenix datetime_select changeset

### Changed

- Timezone abbreviation handling is now only valid for POSIX/Olson timezone names.
- Some small optimizations

### Deprecated

- N/A

### Removed

- Timezone abbreviation handling for non-POSIX/Olson timezone names

### Fixed

- Timezone abbreviation handling (was previously non-deterministic/incorrect)
- Disable tzdata's auto-update during compilation
- Usage of imperative if
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"},
"stream_data": {:hex, :stream_data, "0.5.0", "b27641e58941685c75b353577dc602c9d2c12292dd84babf506c2033cd97893e", [:mix], [], "hexpm", "012bd2eec069ada4db3411f9115ccafa38540a3c78c4c0349f151fc761b9e271"},
"tzdata": {:hex, :tzdata, "1.1.1", "20c8043476dfda8504952d00adac41c6eda23912278add38edc140ae0c5bcc46", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "a69cec8352eafcd2e198dea28a34113b60fdc6cb57eb5ad65c10292a6ba89787"},
"tzdata": {:hex, :tzdata, "1.1.2", "45e5f1fcf8729525ec27c65e163be5b3d247ab1702581a94674e008413eef50b", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "cec7b286e608371602318c414f344941d5eb0375e14cfdab605cca2fe66cba8b"},
"unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"},
}

0 comments on commit 3945fb9

Please sign in to comment.