File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,15 @@ def test_default_timezone_validation
17
17
ActiveRecord . default_timezone = :utc
18
18
end
19
19
20
+ def test_high_precision_current_timestamp
21
+ current_timestamp = Task . with_connection { |conn | conn . high_precision_current_timestamp }
22
+
23
+ task = Task . create!
24
+ task = Task . select ( current_timestamp => :starting ) . find ( task . id )
25
+
26
+ assert_in_delta Time . now , task . starting , 1
27
+ end
28
+
20
29
def test_saves_both_date_and_time
21
30
with_env_tz "America/New_York" do
22
31
with_timezone_config default : :utc do
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ connections:
18
18
<% if ENV['MYSQL_SOCK'] % >
19
19
socket : " <%= ENV['MYSQL_SOCK'] % >"
20
20
<% end % >
21
+ variables :
22
+ time_zone : ' +00:00'
21
23
arunit2 :
22
24
username : rails
23
25
encoding : utf8mb4
@@ -52,6 +54,8 @@ connections:
52
54
<% if ENV['MYSQL_SOCK'] % >
53
55
socket : " <%= ENV['MYSQL_SOCK'] % >"
54
56
<% end % >
57
+ variables :
58
+ time_zone : ' +00:00'
55
59
arunit2 :
56
60
username : rails
57
61
encoding : utf8mb4
You can’t perform that action at this time.
0 commit comments