support SetTime in Unix

This commit is contained in:
Chris Danford
2004-04-18 23:13:22 +00:00
parent d5211311c6
commit fab6e96b07
2 changed files with 17 additions and 0 deletions
@@ -108,6 +108,21 @@ void ArchHooks_Unix::DumpDebugInfo()
LOG->Info( "Threads library: %s", ThreadsVersion().c_str() );
}
void ArchHooks_Unix::SetTime( tm newtime )
{
CString sCommand = ssprintf( "%02d%02d%02d%02d%04d.%02d",
newtime.tm_mon+1,
newtime.tm_mday,
newtime.tm_hour,
newtime.tm_min,
newtime.tm_year+1900,
newtime.tm_sec );
LOG->Trace( "executing '%s'", sCommand.c_str() );
system( sCommand );
}
/*
* Copyright (c) 2003 by the person(s) listed below. All rights reserved.
*
@@ -7,6 +7,8 @@ class ArchHooks_Unix: public ArchHooks
public:
ArchHooks_Unix();
void DumpDebugInfo();
void SetTime( tm newtime );
};
#undef ARCH_HOOKS