Comments (15)
Note: probably the correct place to change it could be at IBPP source, not sure
from flamerobin.
@andy-123 I found some strange behavior related with manually setting DefaultTimeZone = America/Sao_paulo
When not defined the output is correct, but the TZ is odd
I submitted a post at firebird-support
https://groups.google.com/g/firebird-support/c/5FA5R8Pjvog/m/EBqlQ-AwAwAJ
SQL:
select localtime, current_time,
cast(localtime as varchar(42)) as cast_localtime,
cast(current_time as varchar(42)) as cast_current_time
from rdb$database
with DefaultTimeZone = America/Sao_paulo
from flamerobin.
See more here:
FirebirdSQL/firebird#7806 (comment)
from flamerobin.
Note: Flamerobin is NOT subtracting the TZ
from flamerobin.
As I also commented on the issue on the Firebird tracker, it looks like FlameRobin is showing the UTC time.
from flamerobin.
@andy-123 can you take a look?
Looks like we need to load ICU someway, and convert every single field to the specific offset taking account the timezone and time itself
I don't know if we can do it using directly fbclient.dll or just by using ICU dll
For now I'm thinking to change Flamerobin behavior to always show time as GMT+0:00 to avoid misinterpretation of the value
from flamerobin.
I'm sorry for being late. I hope to find time for this in the next few weeks.
from flamerobin.
See PR (Draft) #362 for current state.
from flamerobin.
@arvanus
The PR #362 is almost finished. Unfortunately, the time displayed (localtime/current_time) in the time zone "America/Sao_Paulo" does not match what isql shows. (See also the description in the PR).
It's unclear to me where the BUG comes from.
When debugging isql, I noticed that the DST (Daylight save time) for America/Sao_Paulo is added here. This is responsible for the one hour difference. Sao_Paulo abolished the DST in 2019. This indicates an outdated ICU version. However, my linux and also fbclient/isql seem to have a current version of ICU.
And why is isql correct?
I currently have no idea how to solve this problem. Maybe someone here can help and/or give a good hint or something.
from flamerobin.
Hi, I'll take a look what it could be ASAP
Thanks
from flamerobin.
Thank you.
Maybe this is still helpful:
It depends on the DST (Daylight saving time). With PR #362 applied, the time is displayed correctly if you subtract or add 1/2 year.
from flamerobin.
SO, I tried this SQL in a "legacy" Firebird 4.0
select localtime, localtimestamp, current_time, CURRENT_TIMESTAMP,
cast(localtime as varchar(42)) as cast_localtime,
cast(localtimestamp as varchar(42)) as cast_localtimestamp,
cast(current_time as varchar(42)) as cast_current_time,
cast(CURRENT_TIMESTAMP as varchar(42)) as cast_CURRENT_TIMESTAMP
from rdb$database
And is showing the same time correctly
BUT in another server I get the time with +1Hour, very strange :
When I try in another server with timezone (America/Sao_paulo) manually defined in the conf , I get another behaviour
Note: I'm in a hurry now, so maybe I missed something
from flamerobin.
Thanks for testing. Very strange, ...
Is isql embedded or connected via network? I suspect that this makes a difference.
In the first isql query, the time zone is displayed as "-3:00". This could be a problem loading the ICU library.
from flamerobin.
Via network, remote servers.
Also noted that if the server is using the default OS timezone, or is using a fixed in firebird.conf equal to the OS timezone I get different results somehow
from flamerobin.
I created a small Lazarus project that has the same time problem as flamerobin. I have created a support request for this.
https://groups.google.com/g/firebird-support/c/vic0_wwpOVw
from flamerobin.
Related Issues (20)
- Advanced Metadata Search HOT 2
- Collation of fields are not extracted properly HOT 5
- Extract database doesn't return default collation
- Restore Screen Button
- Replace Collation with Collations HOT 7
- COMMENT ON PARAMETER HOT 1
- Fb4+, Fr truncates field names with more than 32 char HOT 3
- Miss It field in Advanced MetaData Search....
- Current Build/Make instructions for Linux HOT 1
- Data Type Unknown in RDB$BACKUP_HISTORY HOT 4
- Documentation needs to be available for Preferences dialog HOT 2
- Bug, when I need to see the property of a field. HOT 5
- Problem with "Browse data" functionality: space is translated to a linebreak HOT 12
- Linux Builds do not support TZ datatypes HOT 6
- Dependencies not working for Global Temporary Tables
- Support for Firebird 1.0.3 HOT 2
- Source code issue in src/sql/SqlStatement.cpp HOT 1
- Restore Database dialog HOT 1
- Memory leaks HOT 4
- Suggestion. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flamerobin.