We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Submitted by: @ibprovider
string_to_datetime has following code for correction of y2k problem (two-digit year):
tm times2; Firebird::TimeStamp::getCurrentTimeStamp\(\)\.decode\(×2\); // Handle defaulting of year if \(description\[position\_year\] == 0\) \{ times\.tm\_year = times2\.tm\_year \+ 1900; \} else if \(description\[position\_year\] <= 2\) \{ // Handle conversion of 2\-digit years if \(times\.tm\_year < \(times2\.tm\_year \- 50\) % 100\) times\.tm\_year \+= 2000; else times\.tm\_year \+= 1900; \} times\.tm\_year \-= 1900; times\.tm\_mon \-= 1;
--- This code looks to the CURRENT year, but adjust the two-digit year number on 1900 or 2000.
When current year will be more than 2050, this code will return strange result.
The text was updated successfully, but these errors were encountered:
Commented by: @mrotteveel
Please define what you mean with "will return strange result", and why you think it is strange.
Sorry, something went wrong.
Commented by: @asfernandes
This algorithm, if current year is 1990, is also strange.
It will make 80 be 2080, which would probably not be what one were thinking.
In the same way, we must decide how this will work when approaching 2100.
No branches or pull requests
Submitted by: @ibprovider
string_to_datetime has following code for correction of y2k problem (two-digit year):
---
This code looks to the CURRENT year, but adjust the two-digit year number on 1900 or 2000.
When current year will be more than 2050, this code will return strange result.
The text was updated successfully, but these errors were encountered: