Those two scripts are very different.
The first script reads the time from your computer, and uses that to state whether the time is day or night.
If you use the first script, edit it so that just after
@time_stamp = Time.new it has the code:
CODE
$game_switches[123] = @time_stamp.hour > 18
After you insert that line, it will set switch 123 (you can change which switch it looks at, 123 is an example) to true if it is night time (after 6pm), or false if it is not night time (before 6pm).
The second link doesn't have a script at all in the first post.
If you follow the link Blizzard posted which leads
here, it has "in game" time, where the time in the game is not related to the time in the real world.
This second script contains the code:
CODE
# switch ID of the "night" switch
NSWITCH = 52
Which sets switch 52 to true if it is night time.