g | x | w | all
Bytes Lang Time Link
093Pascal250504T000002ZKai Burg
077Python 3 NONREPL + time170503T114649ZMr. Xcod
043PostgreSQL170504T145340Zmanatwor
065R170504T143117ZBLT
050Bash170503T153906ZDimP
039Python 2170503T115532ZASCII-on
010MATL170503T131635ZLuis Men
017Alice170503T173424ZMartin E
00805AB1E170503T105639ZOkx
009Jelly170503T120756ZDennis
021JavaScript ES6170503T110723ZASCII-on
178Swift + Foundation170503T113806ZMr. Xcod
025Charcoal170503T114820ZASCII-on
011Japt170503T114733ZLuke
011Pyth170503T113740ZErik the
040bash170503T112913ZThor
037zsh170503T111822ZThor
014APL Dyalog170503T111957ZAdá
049JS ES6170503T105407Zuser5882

Pascal, 93 B

This complete program requires a processor supporting features of Extended Pascal as defined by ISO standard 10206, in particular the time‐related functionality. Furthermore, the implementation‐defined notion of the value getTimeStamp populates a timeStamp needs to represent the real‐time clock.

program t(output);var t:timeStamp;begin
getTimeStamp(t);write((t.hour=0)and(t.minute<20))end.

In a production program you are of course supposed to verify (timeStamp.dateValid and) timeStamp.timeValid, too. Should you not have a space‐time‐travel machine at hand, you can test the program by setting the date on POSIX™‐compliant platforms with

date 201705040000 # run as superuser and then start the program as normal user

Python 3 (NON-REPL) + time, 81 77 bytes

-4 bytes thanks to Bahrom

import time;e=str(time.strftime('%H:%M'));print(e[:2]=='00'and int(e[3:])<21)

A naïve approach, turning the current date to string and analysing its characters.

PostgreSQL, 43 characters

select now()between'170503'and'170503 0:20'

Just because I prefer SQL for date/time calculations.

Sample run:

bash-4.3$ psql -c "select now()between'170503'and'170503 0:20'"
 ?column? 
----------
 f
(1 row)

R, 65 bytes

library(lubridate)
x=Sys.time()
print(all(!hour(x)&minute(x)<21))

Checks if the hour == 0 and the minute < 21.

Bash, 55 53 51 50 bytes

-1 byte from @robbie0630's comment.

a=`date +%s`;echo $[1493856000<a&a<1493857200?1:0]

Try it online!

The advantage of this solution is that it works for any date (so will return 1 only for the period defined in the challenge, as it uses epoch time).

Python 2, 41 39 bytes

Saved 2 bytes thanks to Erik the Outgolfer

import time
print time.time()/1200%72<1

Try it online!

Uses the same algorithm as my JS and Charcoal answers.

MATL, 10 bytes

Thanks to Dennis for several corrections

Z'1\480*7<

Try it online!

Explanation

Z'    % Push current date and time as a float. Integer part is day, decimal part is time
1\    % Modulo 1. This gives the time, in units of one day
480*  % Multiply by 480
7<    % Less than 7? Note that 21 minutes / one day equals 7 / 480. Implicitly display. 

Alice, 17 bytes

/o
\T@/4&;'-.C+n

Try it online!

Assumes to be run on a machine whose timezone is set to UTC (like the TIO server).

Explanation

While in Ordinal mode, the IP bounces diagonally up and down through the program. While in Cardinal mode, the IP wraps around the edges like most other Fungeoids.

/   Reflect to SE. Switch to Ordinal.
T   Push a string representing the current date and time, in the format:
    YYYY-MM-DDTHH:MM:SS.mmm±AA:BB
/   Reflect to E. Switch to Cardinal.
4&  Run the next command 4 times.
;   Discard four elements from the top of the stack. Since we're in Cardinal mode,
    this attempts to discard four integers. But the top stack value is a string so
    it gets implicitly converted to all the integers contained in the string. So
    year, month, day, hour, minute, seconds, milliseconds, timezone hour,
    timezone minute will be pushed separately. Then the last four of these
    will be discarded, so that we end up with the minute and the hour on
    top of the stack.
'  Push 21.
-   Subtract it from the minutes. Gives something negative for minutes 0 to 20.
.C  Compute the binomial coefficient n-choose-n. This gives 0 for negative
    results and 1 for non-negative ones. SE is down if both this value and
    the current hour are zero.
+   Add the two values. Iff they are both zero, we still get a zero.
n   Logical NOT of the value. Turns 0 into 1 and everything else into 0.
\   Reflect to NE. Switch to Ordinal.
o   Implicitly convert the result to a string and print it.
@   Terminate the program.

05AB1E, 32 26 11 9 8 bytes

žažb«21‹

Explanation:

ža          Is the current hour &
  žb        current minute
     «      concatenated
        ‹   less than
      21    twenty one?

Try it online!

Jelly, 9 bytes

6ŒT|0Ḍ<21

Requires TZ to be set to UTC, which is the case for TIO.

Try it online!

How it works

6ŒT|0Ḍ<21  Main link. No arguments.

6ŒT        Get the current time as a string, in the format HH:MM.
   |0      Bitwise OR each character with 0. This casts the characters to int and
           maps the non-digit character : to 0.
     Ḍ     Undecimal; convert from base 10 to integer.
      <21  Compare the result with 21, so 00:00 to 00:20 return 1, all others
           return 0.

JavaScript (ES6), 26 24 23 22 21 bytes

Saved 3 bytes thanks to Shaggy and 1 byte thanks to Luke.

_=>new Date/12e5%72<1

Checks if time passed in current day is less than 1200000ms (1200s or 20min). Assumes downtime to be 20 minutes not 21, which appears to be the case in the linked post. 00:20UTC is the exclusive upper bound.

Swift + Foundation, 178 bytes

import Foundation;var d=String(describing:Date());func g(_ s:Int)->String{return String(d[d.index(d.startIndex,offsetBy:s)])};print(g(11)+g(12)=="00" ?Int(g(14)+g(15))!<21:false)

Quite short by swift standards. Check it out!

As in my Python answer, I basically converted the current Date to a string and have analysed its digits, depending on which I printed the bool.

Charcoal, 25 bytes

‹﹪÷UPtime.time⟦⟧¹²⁰⁰¦⁷²¦¹

Prints - for truthy, nothing for falsy.

Explanation

    UPtime.time⟦⟧          Python function time.time()
   ÷               ¹²⁰⁰      Divided by 1200
 ﹪                    ¦⁷²   Modulo 72
‹                         ¦¹ Less than 1

Try it online!

Japt, 32 11 bytes

K/12e5%72<1

Try it online!

Pyth, 11 bytes

&g20.d7!.d6

Online interpreter link

bash, 40 bytes:

read h m< <(date +%H\ %M);((h==0&&m<21))

zsh, 38 37 bytes:

date +%H\ %M|read h m;((h==0&&m<21))

APL (Dyalog), 14 bytes

∧/1 20>2↑3↓⎕TS

∧/ is it all-true (AND reduction) that

1 20> these numbers are greater than

2↑ the first two elements of

3↓⎕TS the current Time Stamp with three elements dropped

JS (ES6), 52 50 49 bytes

y=>(x=new Date).getUTCMinutes()<21&&!x.getUTCHours()

Why is Date so long? Just gets the minutes past 00:00 and returns true if they are < 21, and false otherwise.