dateformat to ISO 8601
Change date format for SQL server and Azure that date format will always be ISO 8601 format.
Hello Ken,
-
about change request: I did remove the comment and renamed the variable from dateformat to dateformat_iso8601. How do I update this pull request now? As I can only create a new pull request as far as I can see. Edit If I see correct and read to late, I just commit more changes in my master, correct :)?
-
I checked the details log. I did not took care of the tests. After changing the code I did some tests with rails applications. But going into tests now I see where they fails.
But please clarify: I need to change the tests as well to make them run successful? I can change the values from us english format to iso 8601 in the tests as well, but I am not sure if this is right to just change the tests like this. Also in ``column_test_sqlserver.rb' the test fail in line 285, I wounder about this, because we do not set language where I changed the code and string cast like this depends on language we do set before.
Hello @metaskills,
before I modify the tests, can you take a look on my last comment? It looks suspicious to me changing the tests to make them "just work".
Will do this weekend.
Saw that you just set a release 4 days ago. Since this is not included, did you have the time to take a look at this?
I have not forgotten! Just wanted to get that bug fix out... I'll be on this soon!
@metaskills When is soon? 😆
Hi @YvesR, I am jumping into some old issues/PR now...
Do you still need this merged? Can you give me some context and maybe rebase your branch and resolve the conflicts?
@wpolicarpo Hi. thanks for looking up. Well this fix is still useful and it make sense to do this. I was struggling with tests as we have to remove failed tests to make this work, but I wasn’t in the position to decide this.
I am not totally sure that it is connected but I currently experience issue of datetime formatting after migrating grom rails 5 to 6 I issue update_attribute on a record with updated_on timestamp and I get incorrect SQL like below: EXEC sp_executesql N'UPDATE [options] SET [value] = @0, [updated_on] = @1 WHERE [options].[name] = @2; SELECT @@ROWCOUNT AS AffectedRows', N'@0 nvarchar(max), @1 datetime, @2 varchar(50)', @0 = N'', @1 = '2021-08-27 09:55:47 UTC.16', @2 = 'JournalReportIDs' and '2021-08-27 09:55:47 UTC.16' is clearly improper for mine SQL2012. Any idea from where this UTC.16 extension comes in? I will disable timestamping for now... This part after UTC seems like .%L formatting (as it is random)... Sorry - mine issue is not related to this pull; I was having an old configure_connection overwrite which was not initializing datetime formatter; I would actually update README and discourage overwriting configure_connection as it is doing important stuff