Method Calendar.Time.Fraction()->set_timezone()
- Method
set_timezone
Method timezone
Calendar
set_timezone(Timezone
tz
)
Calendar
set_timezone(string
|Timezone
tz
)
timezone()TimeZone
- Description
-
Set or get the current timezone (including dst) rule. set_timezone returns a new calendar object, as the called calendar but with another set of rules.
Example:
> Calendar.now(); Result: Fraction(Fri 2 Jun 2000 18:03:22.010300 CET) > Calendar.set_timezone(Calendar.Timezone.UTC)->now(); Result: Fraction(Fri 2 Jun 2000 16:03:02.323912 UTC)