clock.xml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <CLISH_MODULE xmlns="http://clish.sourceforge.net/XMLSchema"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://clish.sourceforge.net/XMLSchema
  5. http://clish.sourceforge.net/XMLSchema/clish.xsd">
  6. <!--=======================================================-->
  7. <PTYPE name="TIME_HHMMSS"
  8. pattern="(([0-1][0-9]|[2][0-3]):[0-5][0-9]:[0-5][0-9])"
  9. help="HH:MM:SS using 24 hour clock"/>
  10. <!--=======================================================-->
  11. <PTYPE name="TZ_OFFSET_HR"
  12. method="integer"
  13. pattern="-12..12"
  14. help="Time offset from UTC"/>
  15. <!--=======================================================-->
  16. <PTYPE name="DAY_MONTH"
  17. method="integer"
  18. pattern="0..31"
  19. help="Calendar day of month"/>
  20. <!--=======================================================-->
  21. <PTYPE name="MONTH_NAME"
  22. method="select"
  23. pattern="January(1) February(2) March(3) April(4) May(5) June(6) July(7) August(8) September(9) October(10) November(11) December(12)"
  24. help="Month of the year"/>
  25. <!--=======================================================-->
  26. <PTYPE name="TZ_NAME"
  27. method="select"
  28. pattern="GMT(GreenwichMeanTime) PST(PacificStandardTime) EST(EasternStandardTime)"
  29. help="Timezone Name" />
  30. <!--=======================================================-->
  31. <PTYPE name="YYYY_YEAR"
  32. method="integer"
  33. pattern="1993..2035"
  34. help="Year"/>
  35. <!--=======================================================-->
  36. <COMMAND name="clock"
  37. help="some utility commands for time related details"/>
  38. <!--=======================================================-->
  39. <COMMAND name="clock set"
  40. help="Set the time and date">
  41. <PARAM name="time"
  42. help="Current time"
  43. ptype="TIME_HHMMSS"/>
  44. <PARAM name="day"
  45. help="Day of the month"
  46. ptype="DAY_MONTH"/>
  47. <PARAM name="month"
  48. help="Month of year"
  49. ptype="MONTH_NAME"/>
  50. <PARAM name="year"
  51. help="Year"
  52. ptype="YYYY_YEAR"/>
  53. <ACTION>echo SET-TIME time:${time} day:${day} month:${month} year:${year}</ACTION>
  54. </COMMAND>
  55. <!--=======================================================-->
  56. <COMMAND name="clock timezone"
  57. help="Set the timezone">
  58. <PARAM name="zone"
  59. help="The time zone"
  60. ptype="TZ_NAME"/>
  61. <PARAM name="hours"
  62. help="The offset from the UTC"
  63. ptype="TZ_OFFSET_HR"/>
  64. <ACTION>echo TIMEZONE zone: ${zone} hours:${hours}</ACTION>
  65. </COMMAND>
  66. <!--=======================================================-->
  67. </CLISH_MODULE>