[ scummvm-Patches-1859448 ] Add OSystem::getTimeAndDate API

SourceForge.net noreply at sourceforge.net
Fri Dec 28 00:37:09 CET 2007


Patches item #1859448, was opened at 2007-12-28 00:37
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=1859448&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Max Horn (fingolfin)
Assigned to: Eugene Sandulenko (sev)
Summary: Add OSystem::getTimeAndDate API

Initial Comment:
The attached patch adds a new OSystem::getTimeAndDate method, which does basically what its name suggests: It returnes the current time and date, as time()+localtime() would yield on a POSIX system.

For simplicity, I just used the struct tm from time.h (which *is* part of the C standard) for the return value. But we could just as well define our own Common::Time struct for this, if preferred.

The benefit of this patch is that it reduces (removes?) the need to ever use time/localtime, which are not very portable. In particular, it might help fix (and help avoid similiar issues in the future) bug #1834822 ( WINCE: Save games have incorrect time & date). The PS2 port would also benefit (see patch).


It's a very simple & straight forward patch, we could IMO push it to SVN right now. But since we are in a feature freeze, I'll await Eugene's comment. And I'll be happy to postpone this till after the release, too.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=1859448&group_id=37116




More information about the Scummvm-tracker mailing list