|
1 members (Russ),
4,291
guests, and
724
robots. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
S |
M |
T |
W |
T |
F |
S |
|
|
|
1
|
2
|
3
|
4
|
5
|
|
6
|
7
|
8
|
9
|
10
|
11
|
12
|
|
13
|
14
|
15
|
16
|
17
|
18
|
19
|
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
|
27
|
28
|
29
|
30
|
31
|
|
|
|
|
This is another custom island. This one could be used for ads. This spot is one of the best places for ads on your site to be placed. This can be enabled/disabled on a per forum basis.
|
|
|
|
Joined: Dec 1999
Posts: 30,868
Master Elite Member
|
FUNCTION DirData_ToDateCreated (BYREF pDirData AS DIRDATA, OPTIONAL BYVAL Flags AS LONG) AS STRING
'Purpose
' Used to parse the DateCreated value from an existing DIRDATA structure.
'Parameters
' pDirData (DIRDATA) = The structure representing the file we're working with.
' Flags (Optional LONG) = A bit-field of behavior flags.
' Bit Fields:
' 0 If set, displays UTC time instead of local time.
' Example: DirData_ToDateCreated(pDD, 1) This will cause UTC time to be displayed.
' DirData_ToDateCreated(pDD, 0) This will cause local time to be displayed.
' ... All other bits are unused at this time.
'Return (STRING)
' Returns a string representing the date the file was created.
' The returned string is in this format: month/day/year hour:minute:second AM
' Example: "2/28/2010 4:28:03 PM"
'Dependencies
' The following files must be included: WIN32API.INC
' Must run on Win 2000 Pro or higher because both API calls require it.
'Version History
' 1.00 2010.03.02 Tested by Russ Tanner on PB/CC 5.03.
LOCAL fTime AS FILETIME
LOCAL sTime AS SYSTEMTIME
LOCAL szFormat AS ASCIIZ * 64, szTime AS ASCIIZ * 64, szDate AS ASCIIZ * 64
'Load the fTime structure.
fTime.dwLowDateTime = LO(DWORD, pDirData.CreationTime)
fTime.dwHighDateTime = HI(DWORD, pDirData.CreationTime)
'Convert the time using an API call.
FileTimeToSystemTime fTime, sTime
'Only display UTC if the corresponding flag is set.
IF (Flags AND 1) THEN
SystemTimeToTzSpecificLocalTime BYVAL %NULL, sTime, sTime ' Use this for UTC to Local time
END IF
'Format the time and date.
szFormat = "h':'mm':'ss tt"
GetTimeFormat %LOCALE_SYSTEM_DEFAULT, BYVAL %NULL, sTime, szFormat, szTime, SIZEOF (szTime)
szFormat = "M'/'d'/'yyyy"
GetDateFormat %LOCALE_SYSTEM_DEFAULT, BYVAL %NULL, sTime, szFormat, szDate, SIZEOF (szDate)
FUNCTION = szDate + " " + szTime
END FUNCTION
|
|
|
|
|