@@ -68,7 +68,7 @@ def command_003_pinOn(self, user, message, args):
68
68
pin_num = args [1 ]
69
69
GPIO .setup (int (pin_num ), GPIO .OUT )
70
70
GPIO .output (int (pin_num ), True )
71
- self .replyMessage (user , "\n Pin on: " + pin_num + " at: " + time .strftime ("%Y-%m-%d %a %H:%M:%S" , time .gmtime ()))
71
+ self .replyMessage (user , "\n Pin on: " + pin_num + " at: " + time .strftime ("%Y-%m-%d %a %H:%M:%S" , time .localtime ()))
72
72
73
73
#This method turns off the specified GPIO pin
74
74
def command_003_pinOff (self , user , message , args ):
@@ -77,7 +77,7 @@ def command_003_pinOff(self, user, message, args):
77
77
pin_num = args [1 ]
78
78
GPIO .setup (int (pin_num ), GPIO .OUT )
79
79
GPIO .output (int (pin_num ), False )
80
- self .replyMessage (user , "\n Pin off: " + pin_num + " at: " + time .strftime ("%Y-%m-%d %a %H:%M:%S" , time .gmtime ()))
80
+ self .replyMessage (user , "\n Pin off: " + pin_num + " at: " + time .strftime ("%Y-%m-%d %a %H:%M:%S" , time .localtime ()))
81
81
82
82
#This method writes to the specified GPIO pin
83
83
def command_003_write (self , user , message , args ):
@@ -90,10 +90,10 @@ def command_003_write(self, user, message, args):
90
90
91
91
if int (state ) == 1 :
92
92
GPIO .output (int (pin_num ), True )
93
- self .replyMessage (user , "Pin on: " + pin_num + " at: " + time .strftime ("%Y-%m-%d %a %H:%M:%S" , time .gmtime ()))
93
+ self .replyMessage (user , "Pin on: " + pin_num + " at: " + time .strftime ("%Y-%m-%d %a %H:%M:%S" , time .localtime ()))
94
94
elif int (state ) == 0 :
95
95
GPIO .output (int (pin_num ), False )
96
- self .replyMessage (user , "Pin off: " + pin_num + " at: " + time .strftime ("%Y-%m-%d %a %H:%M:%S" , time .gmtime ()))
96
+ self .replyMessage (user , "Pin off: " + pin_num + " at: " + time .strftime ("%Y-%m-%d %a %H:%M:%S" , time .localtime ()))
97
97
98
98
#This method reads the value of the specified GPIO pin
99
99
def command_003_read (self , user , message , args ):
@@ -102,7 +102,7 @@ def command_003_read(self, user, message, args):
102
102
pin_num = args [1 ]
103
103
GPIO .setup (int (pin_num ), GPIO .IN )
104
104
pin_value = GPIO .input (int (pin_num ))
105
- self .replyMessage (user , "\n Pin read: " + pin_num + " value: " + str (pin_value ) + " at: " + time .strftime ("%Y-%m-%d %a %H:%M:%S" , time .gmtime ()))
105
+ self .replyMessage (user , "\n Pin read: " + pin_num + " value: " + str (pin_value ) + " at: " + time .strftime ("%Y-%m-%d %a %H:%M:%S" , time .localtime ()))
106
106
107
107
#This executes the shell command argument after 'shell' or 'bash'
108
108
def command_003_shell (self , user , message , args ):
@@ -114,12 +114,12 @@ def command_003_shell(self, user, message, args):
114
114
output += line
115
115
print line ,
116
116
retval = p .wait ()
117
- self .replyMessage (user , output + " at: " + time .strftime ("%Y-%m-%d %a %H:%M:%S" , time .gmtime ()))
117
+ self .replyMessage (user , output + " at: " + time .strftime ("%Y-%m-%d %a %H:%M:%S" , time .localtime ()))
118
118
119
119
#This method is the default response
120
120
def command_100_default (self , user , message , args ):
121
121
'''.*?(?s)(?m)'''
122
- self .replyMessage (user , time .strftime ("%Y-%m-%d %a %H:%M:%S" , time .gmtime ()))
122
+ self .replyMessage (user , time .strftime ("%Y-%m-%d %a %H:%M:%S" , time .localtime ()))
123
123
124
124
############################################################################################################################
125
125
if __name__ == "__main__" :
0 commit comments