summaryrefslogtreecommitdiff
path: root/time.c
AgeCommit message (Collapse)Author
2021-04-29Update Time documentationBurdette Lamar
2021-04-01Refactored sub-seconds normalizationsNobuyoshi Nakada
* separated argument to `timespec2timew` from `timespec` to seconds and nano-seconds. * unified nano-seconds and micro-seconds normalizations. Notes: Merged: https://github.com/ruby/ruby/pull/4343 Merged-By: nobu <nobu@ruby-lang.org>
2021-02-19Remove mentions of Bignum in time.cJeremy Evans
Move section on internal details out of the class-level documentation, since users do not need to know that. Update it to use Integer(T_BIGNUM) instead of Bignum. Fixes [Misc #17580]
2021-02-16Parse "-00:00" as UTC for the round-trip [Feature #17544]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4075
2021-02-11Fixed time_t conversion modifiers for debugNobuyoshi Nakada
2021-02-10Compile debugging code for time alwaysNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4168
2021-02-10Fixed the signature of find_time_numguess_getterNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4168
2021-01-13Added `in:` timezone option to `Time.new` [Feature #17485]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4010
2021-01-13Allow UTC offset without colons per ISO-8601 [Bug #17504]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4020
2021-01-12Convert time component strings to integers more strictlyNobuyoshi Nakada
https://bugs.ruby-lang.org/issues/17485#change-89871
2021-01-12Show seconds of utc_offset if not zeroNobuyoshi Nakada
2020-12-31get_tmopt is no longer usedNobuyoshi Nakada
2020-12-31Moved Time.at to builtinNobuyoshi Nakada
2020-12-31Moved Time.now to builtinNobuyoshi Nakada
2020-12-31Moved time.rb to timev.rbNobuyoshi Nakada
2020-12-31Add time.rb as builtinNobuyoshi Nakada
2020-12-07Removed deprecated Time#succNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3841
2020-11-28Subsecond of Time::tm should be 0Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3821
2020-10-21Use rb_intern_const instead of rb_intern in Init functionsNobuyoshi Nakada
``` find . -name \*.o -exec nm {} + |& sed '/Init_.*\.rbimpl_id/!d;s/^.* b //;s/\.[1-9][0-9]*$//;s/\.rbimpl_id$//' | uniq ``` should be empty.
2020-10-21Don't redefine #rb_intern over and over againStefan Stüben
Notes: Merged: https://github.com/ruby/ruby/pull/3589
2020-07-28Fix Time#ceil when result should be the same as the receiverJeremy Evans
Fixes [Bug #17025] Notes: Merged: https://github.com/ruby/ruby/pull/3362
2020-07-28Use https instead of httpKazuhiro NISHIYAMA
2020-07-24Fix Time#to_a behavior with timezone [Bug #17046]S.H
Notes: Merged: https://github.com/ruby/ruby/pull/3355 Merged-By: nobu <nobu@ruby-lang.org>
2020-07-23Ensure time object meets a given condition [Bug #17042]Nobuyoshi Nakada
2020-07-23Merge pull request #3352 from S-H-GAMELINKS/bug/17042-strftimeS.H
Fix Time#strftime with timezone [Bug #17042] Notes: Merged-By: nobu <nobu@ruby-lang.org>
2020-07-21[DOC] time.c document updated.Tanaka Akira
* fraction -> subsecond for consistency with method name * The sentence, "A non-portable feature allows the offset to be negative on some systems.", is removed. Time before 1970 should work portably now. If localtime() doesn't work before 1970, Ruby should extrapolate it. * Time::new -> Time.new "::" for method call is not common notation now. * Time#to_i truncates subsecond * Time#to_f approximates a value in Time object * Time#to_r The sentence, "You can use this method to convert _time_ to another Epoch.", is removed. It is not clear because no actual example of "another Epoch" is given. * Time#usec truncates fraction of microseconds. * Time#nsec truncates fraction of nanoseconds. * describe Time#inspect shows subsecond since Ruby 2.7.0.
2020-07-12Fixed yday and wday with timezone [Bug #17024]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3312
2020-06-29find_time_t: reset status before goto卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3247
2020-06-29add UNREACHABLE_RETURN卜部昌平
Not every compilers understand that rb_raise does not return. When a function does not end with a return statement, such compilers can issue warnings. We would better tell them about reachabilities. Notes: Merged: https://github.com/ruby/ruby/pull/3247
2020-06-29time_mload: do not goto into a branch卜部昌平
I'm not necessarily against every goto in general, but jumping into a branch is definitely a bad idea. Better refactor. Notes: Merged: https://github.com/ruby/ruby/pull/3247
2020-06-29indent [ci skip]卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3247
2020-06-29find_time_t: do not goto into a branch卜部昌平
I'm not necessarily against every goto in general, but jumping into a branch is definitely a bad idea. Better refactor. Notes: Merged: https://github.com/ruby/ruby/pull/3247
2020-06-29utc_offset_arg: do not goto into a branch卜部昌平
I'm not necessarily against every goto in general, but jumping into a branch is definitely a bad idea. Better refactor. Notes: Merged: https://github.com/ruby/ruby/pull/3247
2020-06-29vtm_add_offset: do not goto into a branch卜部昌平
I'm not necessarily against every goto in general, but jumping into a branch is definitely a bad idea. Better refactor. Notes: Merged: https://github.com/ruby/ruby/pull/3247
2020-06-29num_exact: do not goto into a branch卜部昌平
I'm not necessarily against every goto in general, but jumping into a branch is definitely a bad idea. Better refactor. Notes: Merged: https://github.com/ruby/ruby/pull/3247
2020-06-03Append subsec part instead of creating new stringNobuyoshi Nakada
2020-05-11sed -i 's|ruby/impl|ruby/internal|'卜部昌平
To fix build failures. Notes: Merged: https://github.com/ruby/ruby/pull/3079
2020-05-11sed -i s|ruby/3|ruby/impl|g卜部昌平
This shall fix compile errors. Notes: Merged: https://github.com/ruby/ruby/pull/3079
2020-04-08Merge pull request #2991 from shyouhei/ruby.h卜部昌平
Split ruby.h Notes: Merged-By: shyouhei <shyouhei@ruby-lang.org>
2020-03-09Clarify Time::at documentation for in: argumentzverok
Notes: Merged: https://github.com/ruby/ruby/pull/2950
2020-02-27Update docs for Time#at method [ci skip]प्रथमेश Sonpatki
Add docs about all possible options for the `in` argument. Notes: Merged: https://github.com/ruby/ruby/pull/2929 Merged-By: nobu <nobu@ruby-lang.org>
2020-02-10Don't refer Date in the document for Time.Tanaka Akira
2020-02-07more on NULL versus functions.卜部昌平
Function pointers are not void*. See also ce4ea956d24eab5089a143bba38126f2b11b55b6 8427fca49bd85205f5a8766292dd893f003c0e48
2020-01-29ruby_reset_timezone resets leap_second_info.Tanaka Akira
[Bug #15177]
2020-01-28Extract a function, ruby_reset_timezone().Tanaka Akira
Initial implementation of ruby_reset_timezone() assigns ruby_tz_uptodate_p to false.
2020-01-13Simplify obj2ubits checksJohn Hawthorn
If this value is less than zero, then the mask check is guaranteed to fail as well, so we might as well rely on that. Notes: Merged: https://github.com/ruby/ruby/pull/2808
2020-01-13Avoid rb_check_string_type in month_argJohn Hawthorn
This will usually receive a fixnum so we should check that first instead of the more expensive rb_check_string_type check. Notes: Merged: https://github.com/ruby/ruby/pull/2808
2020-01-13Store "UTC" and "" fstring as globals in time.cJohn Hawthorn
Notes: Merged: https://github.com/ruby/ruby/pull/2808
2019-12-26decouple internal.h headers卜部昌平
Saves comitters' daily life by avoid #include-ing everything from internal.h to make each file do so instead. This would significantly speed up incremental builds. We take the following inclusion order in this changeset: 1. "ruby/config.h", where _GNU_SOURCE is defined (must be the very first thing among everything). 2. RUBY_EXTCONF_H if any. 3. Standard C headers, sorted alphabetically. 4. Other system headers, maybe guarded by #ifdef 5. Everything else, sorted alphabetically. Exceptions are those win32-related headers, which tend not be self- containing (headers have inclusion order dependencies). Notes: Merged: https://github.com/ruby/ruby/pull/2711
2019-12-24[DOC] Fix typo in Time#inspectMarcus Stollsteimer