After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 679080 - datetime: add new_from/to_g_date_time()
datetime: add new_from/to_g_date_time()
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-06-28 18:38 UTC by Oleksij Rempel
Modified: 2012-07-04 09:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch adding conversion from/to GstDateTime and GDateTime (5.86 KB, patch)
2012-06-30 04:11 UTC, Josh Doe
committed Details | Review

Description Oleksij Rempel 2012-06-28 18:38:34 UTC
For apps which make casual recording it is important to keep correct time of record. For example cheese, gstreamer and other.
The start time should have different formats:
- for filename
- to display info
- to send a gst_tag_date_time

For first two GDateTime and g_date_time_format is just perfect. For gst_tag_date_time we need GstDateTime.

gst_date_time_new_from_gdatetime is good for this. But currently it is not accessible as API.
Comment 1 Josh Doe 2012-06-30 04:11:29 UTC
Created attachment 217686 [details] [review]
patch adding conversion from/to GstDateTime and GDateTime
Comment 2 Josh Doe 2012-06-30 04:11:49 UTC
I was thinking the same thing this week, as I've made such functions in my projects. I've taken my first stab at creating a patch for core. I've simply exposed gst_date_time_new_from_gdatetime (though I wonder if the public constructor should take ownership instead of a copy), and added gst_date_time_to_gdatetime. I've also tried to add two tests.
Comment 3 Tim-Philipp Müller 2012-07-04 09:06:46 UTC
Oleksij: these are convenience functions, they don't block anything, you can work around this with less than three lines of code.
Comment 4 Tim-Philipp Müller 2012-07-04 09:24:58 UTC
commit 0bbeab52cc6b1911c3a0f5fb828dabe7eebf2149
Author: Tim-Philipp Müller <tim@centricular.net>
Date:   Wed Jul 4 10:23:06 2012 +0100

    tests: make checks for from/to_g_date_time() actually work properly

commit ba6fad9302a50c8bc194ca8e50cc44baf2aa3764
Author: Joshua M. Doe <josh@joshdoe.com>
Date:   Fri Jun 29 21:52:47 2012 -0400

    datetime: add conversion to/from GDateTime
    
    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