以下成员源于类 QDateTime 已过时。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。
(obsolete)
void
|
setTime_t (uint seconds ) |
(obsolete)
uint
|
toTime_t () const |
(obsolete)
QDateTime
|
fromTime_t (uint seconds ) |
(obsolete)
QDateTime
|
fromTime_t (uint seconds , Qt::TimeSpec spec , int offsetSeconds = 0) |
(obsolete)
QDateTime
|
fromTime_t (uint seconds , const QTimeZone & timeZone ) |
[static]
QDateTime
QDateTime::
fromTime_t
(
uint
seconds
)
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns a datetime whose date and time are the number of seconds that have passed since 1970-01-01T00:00:00, Coordinated Universal Time ( Qt::UTC ) and converted to Qt::LocalTime . On systems that do not support time zones, the time will be set as if local time were Qt::UTC .
注意: This function is deprecated. Please use fromSecsSinceEpoch () in new code.
该函数在 Qt 4.2 引入。
另请参阅 toTime_t () 和 setTime_t ().
[static]
QDateTime
QDateTime::
fromTime_t
(
uint
seconds
,
Qt::TimeSpec
spec
,
int
offsetSeconds
= 0)
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns a datetime whose date and time are the number of seconds that have passed since 1970-01-01T00:00:00, Coordinated Universal Time ( Qt::UTC ) and converted to the given spec .
若 spec 不是 Qt::OffsetFromUTC 那么 offsetSeconds 会被忽略。若 spec is Qt::OffsetFromUTC 和 offsetSeconds is 0 then the spec will be set to Qt::UTC , i.e. an offset of 0 seconds.
注意: This function is deprecated. Please use fromSecsSinceEpoch () in new code.
该函数在 Qt 5.2 引入。
另请参阅 toTime_t () 和 setTime_t ().
[static]
QDateTime
QDateTime::
fromTime_t
(
uint
seconds
, const
QTimeZone
&
timeZone
)
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns a datetime whose date and time are the number of seconds that have passed since 1970-01-01T00:00:00, Coordinated Universal Time ( Qt::UTC ) 和采用给定 timeZone .
注意: This function is deprecated. Please use fromSecsSinceEpoch () in new code.
该函数在 Qt 5.2 引入。
另请参阅 toTime_t () 和 setTime_t ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Sets the date and time given the number of seconds that have passed since 1970-01-01T00:00:00, Coordinated Universal Time ( Qt::UTC ). On systems that do not support time zones this function will behave as if local time were Qt::UTC .
注意: This function is deprecated. For new code, use setSecsSinceEpoch ().
另请参阅 toTime_t ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns the datetime as the number of seconds that have passed since 1970-01-01T00:00:00, Coordinated Universal Time ( Qt::UTC ).
On systems that do not support time zones, this function will behave as if local time were Qt::UTC .
注意: This function returns a 32-bit unsigned integer and is deprecated.
If the date is outside the range 1970-01-01T00:00:00 to 2106-02-07T06:28:14, this function returns -1 cast to an unsigned integer (i.e., 0xFFFFFFFF).
To get an extended range, use toMSecsSinceEpoch () 或 toSecsSinceEpoch ().
另请参阅 toSecsSinceEpoch (), toMSecsSinceEpoch (),和 setTime_t ().