<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_time.rb, branch v4.0.2</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Win32: Defer change of timezone name encoding after 3.4</title>
<updated>2024-12-24T04:25:55+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-12-24T02:42:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fb82f3a632fa07dd270ed188cd6ce751ecabcb84'/>
<id>fb82f3a632fa07dd270ed188cd6ce751ecabcb84</id>
<content type='text'>
This change will be merged into 3.5 along with other encoding, command
line, environment variables, etc.

Revert following commits:

- bd831bcca534955533d9135d8c2f22d7ae5b9aa8
  [Bug #20929] Win32: Use `wcsftime`

- 1c15f641cc2bb88fa88123a11036ed58fbf9aa6d
  [Bug #20929] Win32: Encode timezone name in UTF-8

- 78762b52185aa80ee55c0d49b495aceed863dce2
  [Bug #20929] Fix `assert_zone_encoding`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change will be merged into 3.5 along with other encoding, command
line, environment variables, etc.

Revert following commits:

- bd831bcca534955533d9135d8c2f22d7ae5b9aa8
  [Bug #20929] Win32: Use `wcsftime`

- 1c15f641cc2bb88fa88123a11036ed58fbf9aa6d
  [Bug #20929] Win32: Encode timezone name in UTF-8

- 78762b52185aa80ee55c0d49b495aceed863dce2
  [Bug #20929] Fix `assert_zone_encoding`
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #20929] Win32: Encode timezone name in UTF-8</title>
<updated>2024-12-06T09:59:38+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-12-06T07:56:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1c15f641cc2bb88fa88123a11036ed58fbf9aa6d'/>
<id>1c15f641cc2bb88fa88123a11036ed58fbf9aa6d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #20929] Fix `assert_zone_encoding`</title>
<updated>2024-12-06T09:59:38+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-12-05T10:52:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=78762b52185aa80ee55c0d49b495aceed863dce2'/>
<id>78762b52185aa80ee55c0d49b495aceed863dce2</id>
<content type='text'>
The default internal encoding is not taken into account to encode
timezone name.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The default internal encoding is not taken into account to encode
timezone name.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #20797] Check seconds in UTC offset as well as minutes</title>
<updated>2024-10-14T04:55:55+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-10-14T04:55:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9611c619ac60e9aeb0341b0c8cf322a42707ce38'/>
<id>9611c619ac60e9aeb0341b0c8cf322a42707ce38</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Feature #20707] Fix negative UTC offset conversion</title>
<updated>2024-09-06T06:53:46+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-09-06T06:53:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=214668fccbca2db14ce57797017b34acd86d4690'/>
<id>214668fccbca2db14ce57797017b34acd86d4690</id>
<content type='text'>
In short, get rid of division and modulo of negative integers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In short, get rid of division and modulo of negative integers.
</pre>
</div>
</content>
</entry>
<entry>
<title>Move Time#xmlschema in core and optimize it</title>
<updated>2024-09-05T17:23:12+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2024-08-30T11:04:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=57e3fc32ea83e55d40f4cc6c3e437d485c506d34'/>
<id>57e3fc32ea83e55d40f4cc6c3e437d485c506d34</id>
<content type='text'>
[Feature #20707]

Converting Time into RFC3339 / ISO8601 representation is an significant
hotspot for applications that serialize data in JSON, XML or other formats.

By moving it into core we can optimize it much further than what `strftime` will
allow.

```
compare-ruby: ruby 3.4.0dev (2024-08-29T13:11:40Z master 6b08a50a62) +YJIT [arm64-darwin23]
built-ruby: ruby 3.4.0dev (2024-08-30T13:17:32Z native-xmlschema 34041ff71f) +YJIT [arm64-darwin23]
warming up......

|                        |compare-ruby|built-ruby|
|:-----------------------|-----------:|---------:|
|time.xmlschema          |      1.087M|    5.190M|
|                        |           -|     4.78x|
|utc_time.xmlschema      |      1.464M|    6.848M|
|                        |           -|     4.68x|
|time.xmlschema(6)       |    859.960k|    4.646M|
|                        |           -|     5.40x|
|utc_time.xmlschema(6)   |      1.080M|    5.917M|
|                        |           -|     5.48x|
|time.xmlschema(9)       |    893.909k|    4.668M|
|                        |           -|     5.22x|
|utc_time.xmlschema(9)   |      1.056M|    5.707M|
|                        |           -|     5.40x|
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Feature #20707]

Converting Time into RFC3339 / ISO8601 representation is an significant
hotspot for applications that serialize data in JSON, XML or other formats.

By moving it into core we can optimize it much further than what `strftime` will
allow.

```
compare-ruby: ruby 3.4.0dev (2024-08-29T13:11:40Z master 6b08a50a62) +YJIT [arm64-darwin23]
built-ruby: ruby 3.4.0dev (2024-08-30T13:17:32Z native-xmlschema 34041ff71f) +YJIT [arm64-darwin23]
warming up......

|                        |compare-ruby|built-ruby|
|:-----------------------|-----------:|---------:|
|time.xmlschema          |      1.087M|    5.190M|
|                        |           -|     4.78x|
|utc_time.xmlschema      |      1.464M|    6.848M|
|                        |           -|     4.68x|
|time.xmlschema(6)       |    859.960k|    4.646M|
|                        |           -|     5.40x|
|utc_time.xmlschema(6)   |      1.080M|    5.917M|
|                        |           -|     5.48x|
|time.xmlschema(9)       |    893.909k|    4.668M|
|                        |           -|     5.22x|
|utc_time.xmlschema(9)   |      1.056M|    5.707M|
|                        |           -|     5.40x|
```
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] State timezone info in the string wins `in:` keyword</title>
<updated>2023-11-24T10:38:55+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-11-24T10:16:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2ecc372a5d623ff4e470c354c771f8797e527c2d'/>
<id>2ecc372a5d623ff4e470c354c771f8797e527c2d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use embedded TypedData for Time objects</title>
<updated>2023-11-07T20:48:06+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2023-11-07T18:22:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=aa6642de630cfc10063154d84e45a7bff30e9103'/>
<id>aa6642de630cfc10063154d84e45a7bff30e9103</id>
<content type='text'>
This drops the total size of a Time object from 86 bytes to 80 bytes.

Running the benchmark benchmark/time_now.yml, this commit improves
performance of Time.now by about 30%:

```
  Time.now
Branch:  13159405.4 i/s
Master:  10036908.7 i/s - 1.31x  slower

  Time.now(in: "+09:00")
Branch:   2712172.6 i/s
Master:   2138637.9 i/s - 1.27x  slower
```

It also decreases memory usage by about 20%:

```
ary = 10_000_000.times.map { Time.now }

puts `ps -o rss= -p #{$$}`
```

Branch: 961792
Master: 1196544

Co-Authored-By: Jean Boussier &lt;byroot@ruby-lang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This drops the total size of a Time object from 86 bytes to 80 bytes.

Running the benchmark benchmark/time_now.yml, this commit improves
performance of Time.now by about 30%:

```
  Time.now
Branch:  13159405.4 i/s
Master:  10036908.7 i/s - 1.31x  slower

  Time.now(in: "+09:00")
Branch:   2712172.6 i/s
Master:   2138637.9 i/s - 1.27x  slower
```

It also decreases memory usage by about 20%:

```
ary = 10_000_000.times.map { Time.now }

puts `ps -o rss= -p #{$$}`
```

Branch: 961792
Master: 1196544

Co-Authored-By: Jean Boussier &lt;byroot@ruby-lang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove --disable-gems for assert_separately</title>
<updated>2023-08-03T00:11:08+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2023-08-02T21:02:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4b6c584023f41827c891f33a16cb5db221b7cd19'/>
<id>4b6c584023f41827c891f33a16cb5db221b7cd19</id>
<content type='text'>
assert_separately adds --disable=gems so we don't need to add
--disable-gems when calling assert_separately.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
assert_separately adds --disable=gems so we don't need to add
--disable-gems when calling assert_separately.
</pre>
</div>
</content>
</entry>
<entry>
<title>Tighten Time.new(string) parsing</title>
<updated>2023-07-13T23:49:39+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2023-06-22T21:31:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5d4fff845602872eef072e7611558b5f8762efe0'/>
<id>5d4fff845602872eef072e7611558b5f8762efe0</id>
<content type='text'>
Disallow:

* Only year-month
* Only year-month-day
* Preceding whitespace
* Trailing whitespace

Fixes [Bug #19293]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Disallow:

* Only year-month
* Only year-month-day
* Preceding whitespace
* Trailing whitespace

Fixes [Bug #19293]
</pre>
</div>
</content>
</entry>
</feed>
