--- ./myth_upcoming_recordings.pl	2008-03-26 23:47:39.000000000 +0100
+++ ./myth_upcoming_recordings.pl	2008-09-16 11:16:25.000000000 +0200
@@ -19,6 +19,7 @@
     our ($dscheduled, $dduplicates, $ddeactivated, $dconflicts);
     our ($status_text_format, $status_value_format);
     our ($dstatus_text_format, $dstatus_value_format);
+    our ($time_text);
 
 # Default number of upcoming recordings to show
     $dnum_recordings = 5;
@@ -75,6 +76,7 @@
                                                      => \$conflicts,
                'heading=s'                           => \$heading,
                'plain_text'                          => \$plain_text,
+               'time_text'                           => \$time_text,
                'text_format=s'                       => \$text_format,
                'no_conflicts_message=s'              => \$no_conflicts_message,
                'status_text_format=s'                => \$status_text_format,
@@ -183,6 +185,10 @@
     Output information in plain text format (i.e. for inclusion in an e-mail
     notification).
 
+--time_text
+    Output only the unixtime of the beginning of recorded events (i.e. for
+    ACPI wakeup).
+
 --text_format [format]
     Use the provided [format] to display information on the recordings.  The
     format should use the same format specifiers used by mythrename.pl, but
@@ -253,7 +259,10 @@
         next if ((!$conflicts) && (is_conflict($show->{'recstatus'})));
 
     # Print the recording information in the desired format
-        if (defined($plain_text)) {
+        if (defined($time_text)) {
+	    time_print($count);
+	}
+	elsif (defined($plain_text)) {
             text_print($count);
         }
         else {
@@ -327,3 +336,8 @@
         print("$text");
     }
 
+# Print the schedule Time in Unixtime format
+    sub time_print {
+	my $count = shift;
+	print $show->{'recstartts'} . "\n";   
+    }
