Unverified Commit 35b120b7 authored by Sebastian Davids's avatar Sebastian Davids
Browse files

Fix CoffeeScript example



Signed-off-by: default avatarSebastian Davids <sdavids@gmx.de>
parent 1e62a6b4
Loading
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -381,15 +381,13 @@ const epoch = Number(process.env["SOURCE_DATE_EPOCH"]);
const timestamp = Number.isInteger(epoch) ? new Date(epoch * 1000) : new Date();
```

### Coffeescript
### CoffeeScript

```coffeescript
now = new Date()
if process.env.SOURCE_DATE_EPOCH
  now = new Date((process.env.SOURCE_DATE_EPOCH * 1000) + (now.getTimezoneOffset() * 60000))
epoch = Number(process.env["SOURCE_DATE_EPOCH"])
timestamp = if Number.isInteger(epoch) then new Date(epoch * 1000) else new Date()
```


### Ruby

```ruby