Age | Commit message (Collapse) | Author |
|
Also add a unit test for this.
Fixes #524
|
|
|
|
|
|
|
|
This is mostly on nullable return values, and some other minor ones that
I ran across.
https://bugzilla.gnome.org/show_bug.cgi?id=789319
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=777263
|
|
Passing years > 9999, months > 12 or days > 31 to gst_date_time_new() will
cause an assertion and generally does not make much sense. Instead consider it
as a parsing error like hours > 24 and return NULL.
|
|
If no date and only a time is given in gst_date_time_new_from_iso8601_string(),
assume that it is "today" and try to parse the time-only string. "Today" is
assumed to be in the timezone provided by the user (if any), otherwise Z -
just like the behavior of the existing code.
https://bugzilla.gnome.org/show_bug.cgi?id=753455
|
|
Support for (nullable) was added to G-I at the same time as nullable
return values. Previous versions of G-I will not mark return values as
nullable, even when an (allow-none) annotation is present, so it is
not necessary to add (allow-none) annotations for compatibility with
older versions of G-I.
https://bugzilla.gnome.org/show_bug.cgi?id=730957
|
|
Micro optimization to change a function call to a variable access
for all our basic types.
|
|
And move type stuff from GstValue to GstDateTime.
|
|
This should help improve documentation generated for
languages other than C.
https://bugzilla.gnome.org/show_bug.cgi?id=730961
|
|
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720029
|
|
We need to define the GLib log domain before including glib.h, which is
included by glib-compat-private.h.
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=687520
|
|
We want to be able to use this function on random non-NULL input,
this should not result in a runtime-critical.
|
|
|
|
We still don't do that in _to_iso8601_string() though, since
this will probably mostly be used in tags, where it doesn't
matter so much and the microsecond argument might not be
well-received by some tag readers.
|
|
|
|
When we fail to parse the number of seconds, reset the value to -1
instead of passing some error value as seconds. Also, we can still
try to parse timezone information.
|
|
Exposes existing constructor.
API: gst_date_time_to_g_date_time()
API: gst_date_time_new_from_g_date_time()
https://bugzilla.gnome.org/show_bug.cgi?id=679080
|
|
Handle 0 months or days correctly in date strings, so that
2012-06-00 is parsed the same as 2012-06, for example.
|
|
Take into account that not all fields might be valid (though they
are valid in the GDateTime structure). But we should just return
unordered if the set fields don't match. Also, don't check
microseconds when comparing datetimes, since we don't serialise
those by default if they're available. This ensures date times are
still regarded as equal after serialising+deserialising.
|
|
Some tag parsers and writers use same datetime format based on ISO 8601.
We can reduce some code by creating some general functions for it.
API: gst_date_time_to_iso8601_string()
API: gst_date_time_new_from_iso8601_string()
https://bugzilla.gnome.org/show_bug.cgi?id=678031
|
|
Remove constructors we don't want:
gst_date_time_new_ymd_h() because we don't want to
support hour-only for now;
gst_date_time_new_ymd_hm() because we don't want to
add constructors with time info where the caller doesn't
have to think about what timezone the time is in.
Lots of compulsive clean-up. Docs fixes. Replace
has_minute() and has_hour() with has_time().
|
|
In order to deserialise and re-serialise dates and date times
from tags properly, we need to be able to express partial
dates (e.g. YYYY or YYYY-MM) and date times.
We only support partial date times where all the more
significant fields above the first unset field are set
(e.g. YYYY-00-DD is not supported).
Calling _get_foo() when foo is not set is not allowed
any more, callers need to check which fields are set
first.
https://bugzilla.gnome.org/show_bug.cgi?id=677757
|
|
|
|
|
|
GLib's GDateTime doesn't handle properly the gmt offset. Therefore
use our own internal version instead on MacOSX.
See bug #638666
|
|
second => seconds
microsecond argument was dropped
|
|
Many of these are superfluous, added for clarity.
|
|
Fix returning of timezones on systems with gdatetime
to use floats on the math expression to avoid
truncating the fractional part.
Also adds a test for covering this case.
|
|
Adds 2 variants for the gst_date_time_from_unix_epoch function,
one for UTC and another for local time.
API: gst_date_time_new_from_unix_epoch_utc
API: gst_date_time_new_from_unix_epoch_local_time
Fixes #653031
https://bugzilla.gnome.org/show_bug.cgi?id=635031
|
|
Use seconds as double to make API similar to glib's
gdatetime. Also move timezone parameter to the
first position, just like glib's.
https://bugzilla.gnome.org/show_bug.cgi?id=628408
|
|
Move the datetime documentation of the functions outside the
ifdefs
https://bugzilla.gnome.org/show_bug.cgi?id=628408
|
|
Use GDateTime internally on GstDateTime if glib already
provides it.
https://bugzilla.gnome.org/show_bug.cgi?id=628408
|
|
|
|
localtime only takes one parameter and returns a statically
allocated tm struct. Use it correctly.
Fixes #625368
|
|
Adds a datetime functions to gstvalue
Fixes #594504
|
|
Adds GstDateTime to represent dates + time + timezone
information.
Tests included.
API: GstDateTime
API: gst_date_time_get_day
API: gst_date_time_get_month
API: gst_date_time_get_year
API: gst_date_time_get_hour
API: gst_date_time_get_microsecond
API: gst_date_time_get_minute
API: gst_date_time_get_second
API: gst_date_time_get_time_zone_offset
API: gst_date_time_new
API: gst_date_time_new_local_time
API: gst_date_time_new_from_unix_epoch
API: gst_date_time_new_now_local_time
API: gst_date_time_new_now_utc
API: gst_date_time_ref
API: gst_date_time_unref
Fixes #594504
|