mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
Support of correct timezone-based conditions in jsonata #3541
Labels
No labels
A:accessibility
A:api
A:cert-expiry
A:core
A:dashboard
A:deployment
A:documentation
A:domain expiry
A:incidents
A:maintenance
A:metrics
A:monitor
A:notifications
A:reports
A:settings
A:status-page
A:ui/ux
A:user-management
Stale
ai-slop
blocked
blocked-upstream
bug
cannot-reproduce
dependencies
discussion
duplicate
feature-request
feature-request
good first issue
hacktoberfest
help
help wanted
house keeping
invalid
invalid-format
invalid-format
question
releaseblocker 🚨
security
spam
type:enhance-existing
type:new
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/uptime-kuma#3541
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Adrian-Grimm on GitHub (Aug 14, 2024).
📑 I have found these related issues/pull requests
🏷️ Feature Request Type
Other
🔖 Feature description
Some JSON validations require a time based condition e.g. device states with time based states.
But in countries like Germany we have summer and winter time difference in offsets and the default
$now()only supports a fixed timezone offset.e.g.:
$now('[H01]:[m01]', '+0200')✔️ Solution
Integration of jsonata-moment for support of correct timely based conditions in summer and winter time with
$moment()https://github.com/elasticio/jsonata-moment
❓ Alternatives
No response
📝 Additional Context
https://github.com/jsonata-js/jsonata/issues/347
@CommanderStorm commented on GitHub (Aug 14, 2024):
I'd like to not add jet another datetime library.
I would prefer if jsonata would get the functionality to localize dates upstream instead.
=> Contributing a fix upstream is my preferred course of action
@Adrian-Grimm commented on GitHub (Aug 14, 2024):
@CommanderStorm The request is since 2019 open for such a feature - https://github.com/jsonata-js/jsonata/issues/347
quite unlikely to happn...
would you know a alternative aproach to solve this time based problem?
I could also think of making the monitors only time based "active"
A "cron" syntax style config option for execution could help and solve this also.
That could take care of local time of the environment TZ.
@CommanderStorm commented on GitHub (Aug 14, 2024):
Yes, it has been a few years, but without anybody contributing a PR.
If someone contributes a PR upstream, I'd assume that they will review it.
As said:
I'd prefer if you'd contribute the functionality you need upstream.
we can add the plugin if upstream
Monkeypatching functionality without a reason is not maintainable for us, sorry.
@Adrian-Grimm commented on GitHub (Apr 19, 2025):
@CommanderStorm :
Fyi: Seems like a badly maintained project - I got no reply since August there:
https://github.com/jsonata-js/jsonata/issues/347#issuecomment-2293647619
@CommanderStorm commented on GitHub (Apr 19, 2025):
Consider opening up a PR instead. Commenting on an issue is something that requires a lot more effort to review, merge, ...
Also about the timing: once that notification gets clicked away as "I don't currently have the time" it does not reappear for maintainers. PRs are simpler to review.