Jackie, Nice post, however, it's only unique inasmuch as it's not run in a tight loop. Here are a few modifications that I made so it is unique, always, just like SYS(2015).
Here is a test wrapper for it. Sys2015X is your code. I have modified both mine and yours to accept the date and seconds as parameters so the values will be as close to SYS(2015) as possible. The key to keeping SYS(2015) and MySys2015() in sync is to persist the days and milli seconds, making sure that all subsequent calls to MySys2015() makes sure that the number used for the milli seconds is at least 1 greater than the previous call.
lnIter = 20000
FOR x = 1 TO lnIter
ltDateTime = DATETIME()
lnSeconds = SECONDS()
lc2Sys2015 = SYS(2015) && FoxPro's SYS2015 for comparison
lcMySys2015 = MySys2015(ltDateTime, lnSeconds)
lcSys2015X = Sys2015X(ltDateTime, lnSeconds)
IF x > lnIter - 10
? lc2Sys2015, lcMySys2015, lcSys2015X, lnSeconds
ENDIF
ENDFOR
INKEY(.1)
? "After a short break, MySys2015 is still in sync with SYS(2015)"
FOR x = 1 TO 10
ltDateTime = DATETIME()
lnSeconds = SECONDS()
lc2Sys2015 = SYS(2015) && FoxPro's SYS2015 for comparison
lcMySys2015 = MySys2015(ltDateTime, lnSeconds)
lcSys2015X = Sys2015X(ltDateTime, lnSeconds)
? lc2Sys2015, lcMySys2015, lcSys2015X, lnSeconds
ENDFOR
#DEFINE BASE36 '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
#DEFINE MS_IN_DAY 86400*1000
FUNCTION MySys2015(ttDateTime, tnSeconds)
LOCAL lcSys2015, lcMilliSecs, lcDays, ltNow, lnDays, lnMilliSecs
IF VARTYPE(_gnDays) = "U"
PUBLIC _gnDays
_gnDays = 0
ENDIF
IF VARTYPE(_gnMilliSecs) = "U"
PUBLIC _gnMilliSecs
_gnMilliSecs = 0
ENDIF
lcSys2015 = ''
lcMilliSecs = ""
lcDays = ""
*!* ltDateTime = DATETIME()
*!* lnSeconds = SECONDS()
ltDateTime = ttDateTime
lnSeconds = tnSeconds
lnDays = TTOD(ltDateTime) - DATE(YEAR(ltDateTime), 1, 1) + 1 + MOD(YEAR(ltDateTime), 100) * 367
lnMilliSecs = lnSeconds * 1000
DO WHILE _gnDays >= lnDays AND _gnMilliSecs >= lnMilliSecs
lnMilliSecs = _gnMilliSecs + 1
IF lnMilliSecs >= MS_IN_DAY
lnDays = lnDays + 1
lnMilliSecs = 0
ENDIF
ENDDO
_gnDays = lnDays
_gnMilliSecs = lnMilliSecs
FOR lnCounter = 1 TO 6
lcMilliSecs = SUBSTR(BASE36, MOD(lnMilliSecs, 36) + 1, 1) + lcMilliSecs
lnMilliSecs = INT(lnMilliSecs/36)
ENDFOR
FOR lnCounter = 1 TO 3
lcDays = SUBSTR(BASE36, MOD(lnDays, 36) + 1, 1) + lcDays
lnDays = INT(lnDays / 36)
ENDFOR
lcSys2015 = '_' + lcDays + lcMilliSecs
RETURN lcSys2015
ENDFUNC
PROCEDURE Sys2015X(ttDateTime, tnSeconds)
LOCAL lnMilliSecs, lnDays, lcBase36, lcSys2015, lc2Sys2015, lnCounter
*!* ltDateTime = DATETIME()
*!* lnSeconds = SECONDS()
ltDateTime = ttDateTime
lnSeconds = tnSeconds
lnMilliSecs = lnSeconds * 1000
lnDays = TTOD(ltDateTime) - DATE(YEAR(ltDateTime), 1, 1) + 1 + MOD(YEAR(ltDateTime), 100) * 367
lcBase36 = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
lcSys2015 = ""
IF VARTYPE(gcSys2015) = "U"
PUBLIC gcSys2015
gcSys2015 = ""
ENDIF
FOR lnCounter = 1 TO 6
lcSys2015 = SUBSTR(lcBase36, MOD(lnMilliSecs, 36) + 1, 1) + lcSys2015
lnMilliSecs = INT(lnMilliSecs/36)
ENDFOR
FOR lnCounter = 1 TO 3
lcSys2015 = SUBSTR(lcBase36, MOD(lnDays, 36) + 1, 1) + lcSys2015
lnDays = INT(lnDays / 36)
ENDFOR
lcSys2015 = '_' + lcSys2015
RETURN lcSys2015
ENDPROC