Dates do not have timezones, since they don't represent a time.
That said, as for how it calculates the current day, let's look at this extract from the code for
time_t t; struct tm tm; // ... if (time(&t) == -1) rb_sys_fail("time"); if (!localtime_r(&t, &tm)) rb_sys_fail("localtime");
It then proceeds to use use
tm to create the
Date object. Since
tm contains the system's local time using
Date.today therefore uses the system's local time, not UTC.
You can always use
Time#utc on any
Time convert it in-place to UTC, or
Time#getutc to return a new equivalent
Time object in UTC. You could then call
Time#to_date on that to get a
If you’re using ActiveSupport’s time zone support (included with Rails), note that it is completely separate from Ruby’s time constructors and does not affect them (i.e. it does not change how
Date.today work). See also ActiveSupport extensions to