--- a/Win32OperatingSystem.st Fri Jul 25 22:15:54 2003 +0200
+++ b/Win32OperatingSystem.st Fri Jul 25 22:19:01 2003 +0200
@@ -6386,71 +6386,6 @@
"
!
-computeTimeAndDateFrom:osTime
- "given an OS-dependent time in osTime, return an Array
- containing (full-) year, month, day, hour, minute and seconds,
- offset to UTC, daylight savings time flag, milliseconds,
- dayInYear (1..) and dayInWeek (1..).
- Conversion is to localtime including any daylight saving adjustments."
-
- |low hi year month day hours minutes seconds millis utcOffset
- dst yDay wDay osSeconds ret|
-
- millis := osTime \\ 1000.
- osSeconds := osTime // 1000.
-%{
- struct tm *tmPtr;
- struct tm *gmTmPtr;
- INT t;
- TIME_T tt;
-
- t = __longIntVal(osSeconds);
- tt = (TIME_T)t;
-
- tmPtr = localtime(&tt);
- hours = __MKSMALLINT(tmPtr->tm_hour);
- minutes = __MKSMALLINT(tmPtr->tm_min);
- seconds = __MKSMALLINT(tmPtr->tm_sec);
-
- year = __MKSMALLINT(tmPtr->tm_year + 1900);
- month = __MKSMALLINT(tmPtr->tm_mon + 1);
- day = __MKSMALLINT(tmPtr->tm_mday);
-
- yDay = __MKSMALLINT(tmPtr->tm_yday+1);
- wDay = __MKSMALLINT(tmPtr->tm_wday == 0 ? 7 : tmPtr->tm_wday);
-
- if (tmPtr->tm_isdst == 0) {
- dst = false;
- utcOffset = __MKINT(TIMEZONE(tmPtr));
- } else {
- dst = true;
-#ifdef HAS_ALTZONE
- utcOffset = __MKINT(altzone);
-#else
- utcOffset = __MKINT(TIMEZONE(tmPtr) + 3600);
-#endif
- }
-%}.
- "I would love to have SELF-like inline objects ..."
- ret := Array new:11.
- ret at:1 put:year.
- ret at:2 put:month.
- ret at:3 put:day.
- ret at:4 put:hours.
- ret at:5 put:minutes.
- ret at:6 put:seconds.
- ret at:7 put:utcOffset.
- ret at:8 put:dst.
- ret at:9 put:millis.
- ret at:10 put:yDay.
- ret at:11 put:wDay.
- ^ ret
-
- "
- OperatingSystem computeTimeAndDateFrom:0
- "
-!
-
computeTimePartsOf:osTime for:aBlock
"compute hours, minutes, seconds and milliseconds from the osTime
and evaluate the argument, a 4-arg block with these.
@@ -8889,7 +8824,7 @@
!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.131 2003-07-25 20:15:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.132 2003-07-25 20:19:01 cg Exp $'
! !
!Win32OperatingSystem::Win32FILEHandle methodsFor:'release'!
@@ -8916,7 +8851,7 @@
!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.131 2003-07-25 20:15:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.132 2003-07-25 20:19:01 cg Exp $'
! !
!Win32OperatingSystem::Win32Handle methodsFor:'io'!
@@ -9303,7 +9238,7 @@
!Win32OperatingSystem class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.131 2003-07-25 20:15:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.132 2003-07-25 20:19:01 cg Exp $'
! !
Win32OperatingSystem initialize!