time format for JSON output
See original GitHub issuehello,
when i use german language for JSON output, the time format is still in a format with AM
and PM
but in german or europe it is pretty uncommon to use that format, i expect a 24H format for time.
e.g.:
$ curl de.wttr.in/Berlin?format=j1
{
"current_condition": [
{
"FeelsLikeC": "10",
"FeelsLikeF": "50",
"cloudcover": "0",
"humidity": "76",
"lang_de": [
{
"value": "Regen"
}
],
"localObsDateTime": "2022-09-28 11:40 AM",
"observation_time": "09:40 AM",
...
{
"astronomy": [
{
"moon_illumination": "15",
"moon_phase": "Waxing Crescent",
"moonrise": "09:57 AM",
"moonset": "07:48 PM",
"sunrise": "07:02 AM",
"sunset": "06:51 PM"
}
...
i would expect this format:
"localObsDateTime": "2022-09-28 11:40",
"observation_time": "09:40",
...
"moonrise": "09:57",
"moonset": "19:48",
"sunrise": "07:02",
"sunset": "18:51"
...
or is ther another way to select the time format?
Issue Analytics
- State:
- Created a year ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
What is the "right" JSON date format? - Stack Overflow
There is no date format in JSON, there's only strings a de-/serializer decides to map to date values. – user395760. Apr 23, 2012...
Read more >The “right” JSON Date Format - W3docs
To represent dates in JavaScript, JSON uses ISO 8601 string format to encode dates as a string. Dates are encoded as ISO 8601...
Read more >[MS-ES3EX]: Date Time String Format for JSON | Microsoft Learn
2.4.6 Date Time String Format for JSON. Article; 10/12/2020; 2 minutes to read.
Read more >Rest Controller — Configure Date & Time Format in JSON ...
In this article, we have learned how to configure LocalDate, LocalTime and LocalDateTime format pattern in JSON response for @RestController at ...
Read more >JavaScript JSON Date Parsing and real Dates - Rick Strahl
The problem with dates in JSON – and really JavaScript in general – is that JavaScript doesn't have a date literal. You can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
to have an option to choose between 12Hr and 24Hr time format would be nice.
It is a good feature request. Accepted.
Should we make it configurable only with the time format parameter? Probably, the same parameter should be used in the one-line output format and everywhere else.
Also, we could make the date/time format fully configurable from outside (not only AM/PM, but just pass the format string).
If you would like to contribute, feel free to do it. The feature should be added here:
https://github.com/chubin/wttr.in/blob/master/lib/view/line.py#L388