| 
			
				|  | Cheat Engine The Official Site of Cheat Engine
 
 
 |  
 
	
		| View previous topic :: View next topic |  
		| Author | Message |  
		| Polynomial Grandmaster Cheater
 
 ![]() Reputation: 5 
 Joined: 17 Feb 2008
 Posts: 524
 Location: Inside the Intel CET shadow stack
 
 | 
			
				|  Posted: Sat Aug 30, 2025 10:55 pm    Post subject: [Feature request] System date/time spoofing |   |  
				| 
 |  
				| It'd be really useful to be able to spoof the system date & time. Naturally we could manually go through and hook the GetSystemTime, GetSystemTimeAsFileTime, GetLocalTime, and similar APIs by hand, but having a convenient feature to spoof the time to a fixed (unchanging) time, fixed offset (add or subtract a timespan), or locked between a monotonic range (i.e. specify two datetime values to always loop between) would be significantly more convenient. This could be implemented as a companion feature to speedhack. 
 Quite a few games have offline events tied to specific dates and times, so being able to stay within them would be very useful. For example, D2R's terror zones change every hour, and when playing offline the zones are based on the local system time being fed into a lookup table, so by hooking the time APIs it would allow a player to loop over the same zone over and over.
 
 The usual advice I see is to "simply" change the system's date/time by hand, but this breaks TLS timestamp validation globally once your time skew goes outside the tolerance range, so it breaks most network communications. This would be particularly problematic for games that have seasonal events, since you'd be changing your system time by many months and thus guarantee that the TLS validation would break.
 |  |  
		| Back to top |  |  
		|  |  
		| lux How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 28 Mar 2016
 Posts: 7
 
 
 | 
			
				|  Posted: Mon Sep 08, 2025 1:04 pm    Post subject: |   |  
				| 
 |  
				| There's established third party software for this like RunAsDate(64). Maybe TimeTweaker. |  |  
		| Back to top |  |  
		|  |  
		| AylinCE Grandmaster Cheater Supreme
 
  Reputation: 37 
 Joined: 16 Feb 2017
 Posts: 1528
 
 
 | 
			
				|  Posted: Mon Sep 08, 2025 3:54 pm    Post subject: |     |  
				| 
 |  
				| I think I can code this with the CE and "runCommand()" command. 
 The only question is: Should I make it a GUI (form) with edit boxes and buttons that accept and apply loops and time interval inputs?
 
 Okay, I'll do that.
 
 EDIT:
 
 This seems to be working fine.
 
 
  	  | Code: |  	  | if dtmForm1 then dtmForm1.Destroy() dtmForm1=nil end DP1=getScreenDPI()/96
 dtmForm1=createForm()
 dtmForm1.height=200*DP1 dtmForm1.width=295*DP1 dtmForm1.left=490*DP1 dtmForm1.top=300*DP1
 dtmForm1.PopupMode=0 dtmForm1.caption="By AylinCE Trainers"
 dtmForm1.Position="poDesktopCenter" dtmForm1.ShowInTaskBar="stAlways"
 dtmForm1.BorderStyle="bsSingle"
 --[==[
 dtmForm1.BorderStyle="bsNone"
 dtmForm1.setLayeredAttributes(0x000100, 255, LWA_COLORKEY | LWA_ALPHA )
 dtmForm1.Color=0x000100
 Object.OnMouseDown=function() dtmForm1.DragNow() end
 --]==]
 -------------------------
 local dTbl = {}
 ----------------------- dTbl.nwLbl1 -----
 dTbl.nwLbl1=createLabel(dtmForm1)
 dTbl.nwLbl1.AutoSize=false
 dTbl.nwLbl1.height=20*DP1 dTbl.nwLbl1.width=65*DP1 dTbl.nwLbl1.left=5*DP1 dTbl.nwLbl1.top=36*DP1
 dTbl.nwLbl1.caption="NewDate: "
 dTbl.nwLbl1.alignment="taLeftJustify"
 dTbl.nwLbl1.Font.Style="fsBold" dTbl.nwLbl1.Font.Size=-14*DP1
 -----------------------
 ----------------------- dTbl.nwEdt1 -----
 dTbl.nwEdt1=createEdit(dtmForm1)
 dTbl.nwEdt1.AutoSize=false
 dTbl.nwEdt1.height=23*DP1 dTbl.nwEdt1.width=24*DP1 dTbl.nwEdt1.left=75*DP1 dTbl.nwEdt1.top=34*DP1
 dTbl.nwEdt1.text=""
 dTbl.nwEdt1.alignment="taLeftJustify"
 dTbl.nwEdt1.Font.Style="fsBold" dTbl.nwEdt1.Font.Size=0*DP1
 -----------------------
 ----------------------- dTbl.nwEdt2 -----
 dTbl.nwEdt2=createEdit(dtmForm1)
 dTbl.nwEdt2.AutoSize=false
 dTbl.nwEdt2.height=23*DP1 dTbl.nwEdt2.width=24*DP1 dTbl.nwEdt2.left=105*DP1 dTbl.nwEdt2.top=34*DP1
 dTbl.nwEdt2.text=""
 dTbl.nwEdt2.alignment="taLeftJustify"
 dTbl.nwEdt2.Font.Style="fsBold" dTbl.nwEdt2.Font.Size=0*DP1
 -----------------------
 ----------------------- dTbl.nwEdt3 -----
 dTbl.nwEdt3=createEdit(dtmForm1)
 dTbl.nwEdt3.AutoSize=false
 dTbl.nwEdt3.height=23*DP1 dTbl.nwEdt3.width=50*DP1 dTbl.nwEdt3.left=135*DP1 dTbl.nwEdt3.top=34*DP1
 dTbl.nwEdt3.text=""
 dTbl.nwEdt3.alignment="taLeftJustify"
 dTbl.nwEdt3.Font.Style="fsBold" dTbl.nwEdt3.Font.Size=0*DP1
 -----------------------
 ----------------------- dTbl.nwEdt4 -----
 dTbl.nwEdt4=createEdit(dtmForm1)
 dTbl.nwEdt4.AutoSize=false
 dTbl.nwEdt4.height=23*DP1 dTbl.nwEdt4.width=24*DP1 dTbl.nwEdt4.left=195*DP1 dTbl.nwEdt4.top=34*DP1
 dTbl.nwEdt4.text=""
 dTbl.nwEdt4.alignment="taLeftJustify"
 dTbl.nwEdt4.Font.Style="fsBold" dTbl.nwEdt4.Font.Size=0*DP1
 -----------------------
 ----------------------- dTbl.nwEdt5 -----
 dTbl.nwEdt5=createEdit(dtmForm1)
 dTbl.nwEdt5.AutoSize=false
 dTbl.nwEdt5.height=23*DP1 dTbl.nwEdt5.width=24*DP1 dTbl.nwEdt5.left=225*DP1 dTbl.nwEdt5.top=34*DP1
 dTbl.nwEdt5.text=""
 dTbl.nwEdt5.alignment="taLeftJustify"
 dTbl.nwEdt5.Font.Style="fsBold" dTbl.nwEdt5.Font.Size=0*DP1
 -----------------------
 ----------------------- dTbl.nwLbl2 -----
 dTbl.nwLbl2=createLabel(dtmForm1)
 dTbl.nwLbl2.AutoSize=false
 dTbl.nwLbl2.height=23*DP1 dTbl.nwLbl2.width=24*DP1 dTbl.nwLbl2.left=255*DP1 dTbl.nwLbl2.top=34*DP1
 dTbl.nwLbl2.caption="00"
 dTbl.nwLbl2.alignment="taLeftJustify"
 dTbl.nwLbl2.Font.Style="fsBold" dTbl.nwLbl2.Font.Size=-18*DP1
 -----------------------
 ----------------------- dTbl.nwLbl3 -----
 dTbl.nwLbl3=createLabel(dtmForm1)
 dTbl.nwLbl3.AutoSize=false
 dTbl.nwLbl3.height=20*DP1 dTbl.nwLbl3.width=97*DP1 dTbl.nwLbl3.left=5*DP1 dTbl.nwLbl3.top=70*DP1
 dTbl.nwLbl3.caption="Max Progress:"
 dTbl.nwLbl3.alignment="taLeftJustify"
 dTbl.nwLbl3.Font.Style="fsBold" dTbl.nwLbl3.Font.Size=-15*DP1
 -----------------------
 ----------------------- dTbl.startDT -----
 dTbl.startDT=createButton(dtmForm1)
 dTbl.startDT.AutoSize=false
 dTbl.startDT.height=25*DP1 dTbl.startDT.width=95*DP1 dTbl.startDT.left=105*DP1 dTbl.startDT.top=100*DP1
 dTbl.startDT.caption="Start New Date"
 dTbl.startDT.Font.Style="fsBold" dTbl.startDT.Font.Size=0*DP1
 -----------------------
 ----------------------- dTbl.nwEdt6 -----
 dTbl.nwEdt6=createEdit(dtmForm1)
 dTbl.nwEdt6.AutoSize=false
 dTbl.nwEdt6.height=23*DP1 dTbl.nwEdt6.width=40*DP1 dTbl.nwEdt6.left=105*DP1 dTbl.nwEdt6.top=70*DP1
 dTbl.nwEdt6.text=""
 dTbl.nwEdt6.alignment="taLeftJustify"
 dTbl.nwEdt6.Font.Style="fsBold" dTbl.nwEdt6.Font.Size=0*DP1
 -----------------------
 ----------------------- dTbl.nwEdt7 -----
 dTbl.nwEdt7=createEdit(dtmForm1)
 dTbl.nwEdt7.AutoSize=false
 dTbl.nwEdt7.height=23*DP1 dTbl.nwEdt7.width=48*DP1 dTbl.nwEdt7.left=236*DP1 dTbl.nwEdt7.top=70*DP1
 dTbl.nwEdt7.text=""
 dTbl.nwEdt7.alignment="taLeftJustify"
 dTbl.nwEdt7.Font.Style="fsBold" dTbl.nwEdt7.Font.Size=0*DP1
 -----------------------
 ----------------------- dTbl.nwLbl4 -----
 dTbl.nwLbl4=createLabel(dtmForm1)
 dTbl.nwLbl4.AutoSize=false
 dTbl.nwLbl4.height=20*DP1 dTbl.nwLbl4.width=81*DP1 dTbl.nwLbl4.left=157*DP1 dTbl.nwLbl4.top=70*DP1
 dTbl.nwLbl4.caption="Max Cycle:"
 dTbl.nwLbl4.alignment="taLeftJustify"
 dTbl.nwLbl4.Font.Style="fsBold" dTbl.nwLbl4.Font.Size=-15*DP1
 -----------------------
 ----------------------- dTbl.nwLbl5 -----
 dTbl.nwLbl5=createLabel(dtmForm1)
 dTbl.nwLbl5.AutoSize=false
 dTbl.nwLbl5.height=20*DP1 dTbl.nwLbl5.width=285*DP1 dTbl.nwLbl5.left=5*DP1 dTbl.nwLbl5.top=135*DP1
 dTbl.nwLbl5.caption="Original Time: ..."
 dTbl.nwLbl5.alignment="taCenter"
 dTbl.nwLbl5.Font.Style="fsBold" dTbl.nwLbl5.Font.Size=-15*DP1
 -----------------------
 ----------------------- dTbl.startDT1 -----
 dTbl.startDT1=createButton(dtmForm1)
 dTbl.startDT1.AutoSize=false
 dTbl.startDT1.height=25*DP1 dTbl.startDT1.width=95*DP1 dTbl.startDT1.left=105*DP1 dTbl.startDT1.top=165*DP1
 dTbl.startDT1.caption="Original Time"
 dTbl.startDT1.Font.Style="fsBold" dTbl.startDT1.Font.Size=0*DP1
 -----------------------
 ----------------------- dTbl.nwLbl6 -----
 dTbl.nwLbl6=createLabel(dtmForm1)
 dTbl.nwLbl6.AutoSize=false
 dTbl.nwLbl6.height=24*DP1 dTbl.nwLbl6.width=285*DP1 dTbl.nwLbl6.left=5*DP1 dTbl.nwLbl6.top=5*DP1
 dTbl.nwLbl6.caption="CE Time Manipulation"
 dTbl.nwLbl6.alignment="taCenter"
 dTbl.nwLbl6.Font.Style="fsBold" dTbl.nwLbl6.Font.Size=-18*DP1
 -----------------------
 for i=1, 5 do dTbl["nwEdt"..i].ShowHint=true end
 dTbl.nwEdt1.TextHint="MM" dTbl.nwEdt2.TextHint="DD"
 dTbl.nwEdt3.TextHint="YYYY" dTbl.nwEdt4.TextHint="HH"
 dTbl.nwEdt5.TextHint="mm"
 --############################################################################--
 -- Disables Windows time synchronization services to allow manual time
 function offTimeBroker()
 runCommand([[powershell -Command "Stop-Service TimeBrokerSvc"]], true)
 runCommand([[powershell -Command "Set-Service TimeBrokerSvc -StartupType Disabled"]], true)
 runCommand([[powershell -Command "schtasks /Change /TN '\Microsoft\Windows\Time Synchronization\SynchronizeTime' /Disable"]], true)
 runCommand([[powershell -Command "w32tm /config /update /manualpeerlist:'' /syncfromflags:NO"]], true)
 runCommand([[powershell -Command "Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\Config' -Name 'AnnounceFlags' -Value 5"]], true)
 end
 
 -- Restores Windows time synchronization services to default state
 function onTimeBroker()
 runCommand([[powershell -Command "Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\Parameters' -Name Type -Value 'NT5DS'"]], true)
 runCommand([[powershell -Command "Set-Service w32time -StartupType Automatic"]], true)
 runCommand([[powershell -Command "Start-Service w32time"]], true)
 runCommand([[powershell -Command "Set-Service TimeBrokerSvc -StartupType Manual"]], true)
 runCommand([[powershell -Command "Start-Service TimeBrokerSvc"]], true)
 runCommand([[powershell -Command "schtasks /Change /TN '\Microsoft\Windows\Time Synchronization\SynchronizeTime' /Enable"]], true)
 runCommand([[powershell -Command "w32tm /config /update /manualpeerlist:'time.windows.com' /syncfromflags:MANUAL"]], true)
 runCommand([[powershell -Command "w32tm /resync"]], true)
 end
 --############################################################################--
 -- Destroys existing timers if they exist
 if realTimeTimer then realTimeTimer.Destroy() realTimeTimer=nil end
 if revertTimer then revertTimer.Destroy() revertTimer=nil end
 
 -- Timer to simulate and display original system time (before manipulation)
 realTimeTimer = createTimer()
 realTimeTimer.Interval = 1000
 realTimeTimer.Enabled=true
 
 -- Timer to count down until system time is restored
 revertTimer = createTimer()
 revertTimer.Interval = 1000
 revertTimer.Enabled=false
 
 local revertCountdown = 0
 -- Stores the original system time before manipulation
 local originalTimestamp = os.time()
 -- Stores system uptime at the moment of manipulation
 local tickAtStart = getTickCount()
 local startTimestamp = originalTimestamp
 -- Placeholder for cycle input (how many times to repeat manipulation)
 local cycleInput = dTbl.nwEdt7.Text
 
 dTbl.startDT.OnClick=function()
 -- EditBox 1: Month (1–12)
 local M = tonumber(dTbl.nwEdt1.Text) or 1
 if M < 1 or M > 12 then M = 1 end
 -- EditBox 2: Day (1–31)
 local D = tonumber(dTbl.nwEdt2.Text) or 1
 if D < 1 or D > 31 then D = 1 end
 -- EditBox 3: Year (e.g. 2025)
 local Y = tonumber(dTbl.nwEdt3.Text) or 2025
 if Y < 2000 then Y = 2025 end
 -- EditBox 4: Hour (0–23)
 local H = tonumber(dTbl.nwEdt4.Text) or 0
 if H < 0 or H > 23 then H = 0 end
 -- EditBox 5: Minute (0–59)
 local Min = tonumber(dTbl.nwEdt5.Text) or 0
 if Min < 0 or Min > 59 then Min = 0 end
 -- Disable time protection services
 offTimeBroker()
 -- Apply new system time
 local newDate = string.format("%02d/%02d/%04d %02d:%02d", M, D, Y, H, Min)
 runCommand([[powershell -Command "Set-Date -Date ']]..newDate..[['"]], true)
 
 -- EditBox 6: Delay in minutes before restoring original time
 local delayMin = tonumber(dTbl.nwEdt6.Text)
 if not delayMin or delayMin < 0 then delayMin = 0 end
 if delayMin > 0 then
 revertCountdown = delayMin * 60
 revertTimer.Enabled = true
 end
 
 -- EditBox 7: Number of manipulation cycles
 -- "" = infinite loop, "1" = single execution, "4" = repeat 4 times
 local cycleInput = dTbl.nwEdt7.Text
 maxCycle = (cycleInput == "") and -1 or tonumber(cycleInput)
 if not maxCycle or maxCycle < 1 then maxCycle = 1 end
 cycleCount = 0
 end
 
 -- Counts down and restores system time when timer expires
 revertTimer.OnTimer = function()
 if revertCountdown > 0 then
 revertCountdown = revertCountdown - 1
 dTbl.nwLbl2.Caption = tostring(revertCountdown)  -- Shows remaining seconds
 else
 revertTimer.Enabled = false
 onTimeBroker()  -- Re-enable time sync
 end
 end
 
 -- Formats time table into readable string
 function formatTime(t)
 return string.format("%02d.%02d.%04d %02d:%02d:%02d", t.day, t.month, t.year, t.hour, t.min, t.sec)
 end
 
 -- Updates label with simulated original time (based on uptime, not system c
 realTimeTimer.OnTimer = function()
 local success, result = pcall(function()
 local elapsedSec = (getTickCount() - tickAtStart) / 1000
 local t = os.date("*t", originalTimestamp + math.floor(elapsedSec))
 return formatTime(t)
 end)
 
 if success then
 dTbl.nwLbl5.Caption = "Original Time: " .. result
 else
 dTbl.nwLbl5.Caption = "Original Time: [error]"
 end
 end
 
 -- Manually restores time synchronization and stops countdown
 dTbl.startDT1.OnClick=function()
 revertTimer.Enabled = false
 onTimeBroker()
 dTbl.nwLbl2.Caption = "00"
 end
 | 
 
 Enjoy it!
 
 
 
 
	
		
	 
		| Description: |  |  
		| Filesize: | 34.11 KB |  
		| Viewed: | 693 Time(s) |  
		| 
  
 
 |  
 _________________
 
 |  |  
		| Back to top |  |  
		|  |  
		|  |  
  
	| 
 
 | You cannot post new topics in this forum You cannot reply to topics in this forum
 You cannot edit your posts in this forum
 You cannot delete your posts in this forum
 You cannot vote in polls in this forum
 You cannot attach files in this forum
 You can download files in this forum
 
 |  |