# Respect user preferences when formatting timestamp \(\#7994\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/dc7e14f88816c3fbbf6662a63acdbb236828b03a)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: dc7e14f88816c3fbbf6662a63acdbb236828b03a

Requested commit: dc7e14f88816c3fbbf6662a63acdbb236828b03a

Commit: dc7e14f88816c3fbbf6662a63acdbb236828b03a

Tree: 696aeea162cd138b0e6c7bbd98391780144c1386

Author: Bennet Bo Fenner

Committer: GitHub

## Message

```
Respect user preferences when formatting timestamp (#7994)

This is a follow up to #7945. The current behaviour reads the locale and
infers from that which type of time format should be used (12 hour/24
hour).
However, in macOS you can override this behaviour, e.g. you can use
en_US locale but still use the 24 hour clock format (Can be customized
under Settings > General > Date & Format > 24-hour time). You can even
customize the date format.

This PR uses the macOS specific `CFDateFormatter` API, which outputs
time format strings, that respect those settings.

Partially fixes #7956 (as its not implemented for linux)

Release Notes:

- Added localization support for all macOS specific date and time
configurations in chat
```

## Parents

- [7599933f306aaea060a66ed5c96b606835833853](https://git.cafe/gitcafe/zed/commit/7599933f306aaea060a66ed5c96b606835833853?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/dc7e14f88816c3fbbf6662a63acdbb236828b03a?format=markdown)
