Skip to main content

timezone

Configuration

name: timezone
type: string
default: +0000
{
"name": "company/project",
"extra": {
"violinist": {
"timezone": "+0000"
}
}
}

Indicate what timezone to use for the option timeframe_disallowed.

Explanation

It would not help much to restrict the timeframe for the updates to be run, unless you could also say what timezone you were talking about. This is what the timezone option is for.

Example

Say you want to only update the project with Violinist outside working hours, and you are located in the timezone PDT. By default, specifying a timeframe would use the UTC timezone, so to avoid having to convert the time to your timezone, you could specify this in your composer.json. So say your project, including timeframe_disallowed, had the following composer.json:

{
"name": "company/project",
"description": "My awesome project",
"require": {
"vendor/package": "~1.0.0",
},
"extra": {
"violinist": {
"timeframe_disallowed": "06:00-18:00"
}
}
}

To make Violinist start using your timezone, you would add something like this:

{
"name": "company/project",
"description": "My awesome project",
"require": {
"vendor/package": "^1.4.0",
},
"extra": {
"violinist": {
"timeframe_disallowed": "06:00-18:00",
"timezone": "-0700"
}
}
}

You can also use one of the predefined PHP timezones:

{
"name": "company/project",
"description": "My awesome project",
"require": {
"vendor/package": "^1.4.0",
},
"extra": {
"violinist": {
"timeframe_disallowed": "06:00-18:00",
"timezone": "America/Los_Angeles"
}
}
}