-
Notifications
You must be signed in to change notification settings - Fork 137
wrong time on chart component #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Bonjour, You need ISO datetimes who are parsed and displayed in a readable format. select
'chart' as component,
'Historique du solde' as title,
'area' as type,
'red' as color,
1 as marker,
TRUE as time,
1000 as ymax;
select
strftime('%Y-%m-%dT%H:%M:%fZ',date_created) as x,
printf("%.2f",(SUM(prix) OVER(order by date_created))) as y
FROM finances; |
Nice, I don't notice the subtility of " and ISO datetime are ....". @DSMejantel : Mais d'un autre coté, si "chart" n'accepte que des dates ISO, pourquoi ne pas forcer la conversion via sqlpage ? |
Hello @guiguid, and welcome to SQLPage ! The provided datetime string does not have timezone information, and SQLPage interprets it as a local datetime, but displays it as UTC on the x axis by default. I do agree that this behavior is surprising and should be changed. The default behavior should be to display the data in the user's local timezone when no timezone info is provided. I will change that for the next version of SQLPage. However, if I may give a piece of unsolicited advice: you probably should not store local datetime strings without timezone information in your database. Such strings are inherently ambiguous. You may want to store either a datetime string with timezone information (such as |
Hi @lovasoa , As all my users are ( for now) in the same TZ, I basically store datetime in local time in SQLITE db (Yes, KISS for now...) CREATE TABLE balance (
dt DATE DEFAULT (datetime('now','localtime')),
....
); I'll give a try to your advise. |
The behavior of SQLPage concerning x axes in time series plots was changed. |
Your app sounds cool! Do you have a link? Have you written about it? |
Not now. It's a private usage only, but I could write something about, that's a good idea. |
I would love to read about it. And if you have pain points while learning SQLPage, I'm very interested in that too, I'm currently trying to simplify and clarify the website and documentation. |
I've point some things:
Maybe I have to open issue for each items above ? |
Thank you for the feedback! 1.I'll add a multi line plot example.
|
Introduction
There is a gap in the time in SQLITE, and "chart" component ( True as TIME ).
To Reproduce
List of steps to reproduce the behavior. Include the sql file you are using and the eventual relevant parts of your database schema
others component works (timeline component) :
Actual behavior
chart component display wrong time :
Expected behavior
The time displayed by "chart" component should be the same as SQLITE and others components.
Version information
Additional context
Local Time: GMT +1 (Paris) + Summer.
more
Thanks for this amazing tool!
The text was updated successfully, but these errors were encountered: