(time() > strtotime('1 am ' . date('30-5-2021')))
Thanks byronlunz!!
The other question I should have asked: how about the converse, ie, the boolean expression that would HIDE my module after a certain date, say, starting on 05/30/2021 (and DISPLAY it before that date)?
Thanks @byronlunz!
The quick and easy way to negate something is to wrap it in !(). 🙂
Even simpler: (time() > strtotime(“10am July 31 2021”))
However, on my server, this function seems to only check UTC, not the server’s timezone. For me, I have to pick a time 7 hours ahead of me… but it does work.
Thank you both! @jhorowitz, given @byronlunz’s simplified version, you’re saying that to HIDE my module after a certain date, say, hiding on on 7am (UTC) August 27 2021 (and DISPLAYING it until that date), I would enter:
!((time() > strtotime(“7am August 27 2021”)))
Well heck @byronlunz and @jhorowitz, entering any of those expressions into any module’s Module Settings>Advanced>Content Visibility field causes a “Bad Gateway 502” error for the front-end page when saved.
!((time() > strtotime(“7am August 27 2021”)))
(time() > strtotime(“7am August 27 2021”))
(time() > strtotime('1 am ' . date('30-5-2021')))
I have a feeling I’m making a simple syntax error:
https://www.dropbox.com/s/tvoux31x0r6cf58/Screen%20Shot%202021-08-25%20at%203.52.43%20AM.png?dl=0
-
This reply was modified 4 years, 9 months ago by
Til Luchau.
Sorry if my examples were confusing; they include too many parens.
Check out https://i.imgur.com/dyL2AT1.png then try removing the outer set of parens.