Add parameter localtime in today() and now()
[ACL.git] / test / date_check_today.cpp
index b47d397..fabbcbe 100644 (file)
@@ -13,12 +13,22 @@ int main(int argc, char *argv[])
 {
    date d0;
 
-   if (argc == 2)
+   if (argc >= 2)
    {
       String system_date(argv[1]);
       date d1(system_date);
 
-      d0 = today();
+      if (argc == 3)
+      {
+         // Use UTC
+         d0 = today(false);
+      }
+      else
+      {
+         // Use local time
+         d0 = today();
+      }
+      std::cout << "Date of today() = " << d0 << "\n";
       assert(d0 == d1);
    }