diff options
author | Kurt Zenker <kz@openoffice.org> | 2007-06-19 15:11:05 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2007-06-19 15:11:05 +0000 |
commit | e928059c123d6c3b4ee8162f2634b99011d9fe75 (patch) | |
tree | eac31dde786b3efc4c544dc17fd31476c8473bbc /ucb | |
parent | 8510dd4545d6a58f7421bfc50269bc1a9b0584a5 (diff) |
INTEGRATION: CWS ucbfixes02 (1.8.48); FILE MERGED
2007/06/14 10:23:20 kso 1.8.48.3: #i77995# - now return value of osl_getDateTimeFromTimeValue() is taken into
account => return invalid css.util.DateTime in case of failure.
Issue number:
Submitted by:
Reviewed by:
2007/06/12 08:19:35 kso 1.8.48.2: RESYNC: (1.8-1.9); FILE MERGED
2007/05/31 14:08:22 kso 1.8.48.1: #i77995# - GVFS Content Provider does no longer use solar libs.
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/gvfs/content.cxx | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/ucb/source/ucp/gvfs/content.cxx b/ucb/source/ucp/gvfs/content.cxx index 751e5eb8672c..47222b9ec2c3 100644 --- a/ucb/source/ucp/gvfs/content.cxx +++ b/ucb/source/ucp/gvfs/content.cxx @@ -4,9 +4,9 @@ * * $RCSfile: content.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: ihi $ $Date: 2007-06-05 18:02:54 $ + * last change: $Author: kz $ $Date: 2007-06-19 16:11:05 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -38,7 +38,9 @@ #include <string.h> #include <unistd.h> #include <sys/types.h> -#include <tools/datetime.hxx> + +#include "osl/time.h" + #ifndef _OSL_DIAGNOSE_H_ #include <osl/diagnose.h> #endif @@ -631,13 +633,16 @@ rtl::OUString Content::getParentURL() static util::DateTime getDateFromUnix (time_t t) { - static const Date epochStart( 1,1,1970 ); - - ::DateTime tmp; - tmp.MakeDateTimeFromSec( epochStart, ((long unsigned int) t) ); - - return util::DateTime( 0, tmp.GetSec(), tmp.GetMin(), tmp.GetHour(), - tmp.GetDay(), tmp.GetMonth (), tmp.GetYear ()); + TimeValue tv; + tv.Nanosec = 0; + tv.Seconds = t; + oslDateTime dt; + + if ( osl_getDateTimeFromTimeValue( &tv, &dt ) ) + return util::DateTime( 0, dt.Seconds, dt.Minutes, dt.Hours, + dt.Day, dt.Month, dt.Year); + else + return util::DateTime(); } uno::Reference< sdbc::XRow > Content::getPropertyValues( |