Taking time

I am wondering if I could use Real Date and Time by Ron Newcomb to take the time of a players computer, and then make the status line say if it is morning, afternoon ect depending on the current time on the gaming device.

Why wouldn’t you be able to do that? It seems like an entirely straightforward application of the extension.

The only caveat is that not all interpreters support that feature so you’d need to take that possibility into account.

I’m busy trying to get this to work. Here is the basic but I have two problems:

To say day cycle:
if the player’s time is 7:30;
say “Hello”.

When play begins:
now the right hand status line is “[Day cycle].”

First-if the player’s time is doesn’t work and I’m not sure how to do it.
Second-If this code DID work I would only be able to do it with a single time, is there a way to make it work between two certain times.

And if I’m completely of the rails here how should I do this?

First, you need to get the colons and semicolons in the right places.
Second, you need to use Anglochrone times of day (with the PM’s and AM’s).

To say day cycle: if the player's time is greater than 4:59 AM and the player's time is less than 10:00 AM: say "Good morning, world!".

You use a colon after the name of the phrase or rule etc. that you are defining.

To say day cycle:

You use a colon after a line that begins with an “if”, “otherwise”, “else”, “unless”, “while”, or “repeat”.

	if the player's time is greater than 4:59 AM and the player's time is less than 10:00 AM:

You use semicolons elsewhere (i.e. after each line in a block of code).

		say "Err ...";
		say line break;
		now the printed name of the player is "Mr Minit";
		say "Good morning, world!";

For the very last and final line in the definition of a phrase or rule, use a full stop (or a semicolon followed by a blank line).

		say "Good morning, world!".

Thank you felix. It looks like its working but the built-in interpreter doesn’t seem to support it :cry:

I need help now with a different time problem, I need to let people for whoes supporter doesn’t support the time and date feature. Would it be possible using Inform 7 to allow the player to put in a time for example, can Inform keep track of time inside the program, and if so would it require using Inform 6 code?