Creating a time game mechanic that keeps track of time. And how to acces real time.

Hi guys !
So as you can see the title, im wondering mostly how would one go about using a time based mechanic that the game ties into the time dependancies. And if there is a way to access say A. The system / computer time, and/or B. The current world time trough internet conectivity.
For example, if the player goes trough area A att 10 am there is a #action# happening specific on that time 10 - 11. Also i want this to be able to be used inbetween scenes, tho im guessing unity takes care of that ?

If you are coding in C#, you can look there : DateTime Struct (System) | Microsoft Learn. For javascript, I don’t know.

Alright, thanks mate, sadly im not using C# but java… im not that profound of a coder.

@berenger hmm actually you can access the same class in js same like u do in c# but you have to use import instead of using…

using System;          //c#..

import System;         //js..

this is same for all headers in c#(mono). but ofc there are some restrictions but other than tht js is equally capable as c#