Gst.DateTime.new
function new(tzoffset:Number, year:Number, month:Number, day:Number, hour:Number, minute:Number, seconds:Number):Gst.DateTime { // Gjs wrapper for gst_date_time_new() }
Creates a new Gst.DateTime using the date and times in the gregorian calendar in the supplied timezone.
year should be from 1 to 9999, month should be from 1 to 12, day from 1 to 31, hour from 0 to 23, @minutes and seconds from 0 to 59.
Note that tzoffset is a float and was chosen so for being able to handle some fractional timezones, while it still keeps the readability of represeting it in hours for most timezones.
If value is -1 then all over value will be ignored. For example if month == -1, then Gst.DateTime will created only for year. If day == -1, then Gst.DateTime will created for year and month and so on.
Free-function: gst_date_time_unref
- tzoffset
Offset from UTC in hours.
- year
the gregorian year
- month
the gregorian month
- day
the day of the gregorian month
- hour
the hour of the day
- minute
the minute of the hour
- seconds
the second of the minute
- Returns
the newly created Gst.DateTime