PHPackages                             jpuck/carbon-console - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. jpuck/carbon-console

ActiveLibrary[CLI &amp; Console](/categories/cli)

jpuck/carbon-console
====================

Convert timezones and formats with Carbon wrapped in a PHP7 command line symfony console application.

1.0.0(9y ago)314[1 issues](https://github.com/jpuck/carbon-console/issues)GPL-3.0+PHPPHP ^7.0

Since Feb 16Pushed 9y ago1 watchersCompare

[ Source](https://github.com/jpuck/carbon-console)[ Packagist](https://packagist.org/packages/jpuck/carbon-console)[ RSS](/packages/jpuck-carbon-console/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

Carbon Console
==============

[](#carbon-console)

Convert timezones and formats with [Carbon](http://carbon.nesbot.com/) wrapped in a PHP7 command line [symfony console application](http://symfony.com/doc/current/components/console.html).

[![Build Status](https://camo.githubusercontent.com/a10c6946caabc09414114223bbc827f9cc26dacd14ed0ba934cad652b36e9eca/68747470733a2f2f7472617669732d63692e6f72672f6a7075636b2f636172626f6e2d636f6e736f6c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jpuck/carbon-console)[![Codecov](https://camo.githubusercontent.com/4405863d8e1ec782b570a35fc684189985dc0d5d93d5489f1b10ebe27ccaf57f/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6a7075636b2f636172626f6e2d636f6e736f6c652f6d61737465722e737667)](https://codecov.io/gh/jpuck/carbon-console/branch/master)[![Latest Stable Version](https://camo.githubusercontent.com/70a35f81a4a0c5aca122748397731b2c8c804654e83d9f4a614a3fdca7fc0957/68747470733a2f2f706f7365722e707567782e6f72672f6a7075636b2f636172626f6e2d636f6e736f6c652f762f737461626c65)](https://github.com/jpuck/carbon-console/releases/latest)[![Total Downloads](https://camo.githubusercontent.com/40b27214f063b5cbc418eb3d6ec64e05a95703f2c5017b8ffb5b6c3e92389653/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f6a7075636b2f636172626f6e2d636f6e736f6c652f746f74616c2e737667)](https://github.com/jpuck/carbon-console/releases/latest)[![License](https://camo.githubusercontent.com/8d18633b15b708c289040cb6c8173eaf6938c16b81d3c0202a20784dd5d44059/68747470733a2f2f706f7365722e707567782e6f72672f6a7075636b2f636172626f6e2d636f6e736f6c652f6c6963656e7365)](https://github.com/jpuck/carbon-console/releases/latest)

- [Installation](#installation)
    - [phive](#phive)
    - [download](#download)
    - [composer](#composer)
    - [source](#source)
- [Usage](#usage)
- [Examples](#examples)

Installation
------------

[](#installation)

First make sure you have at least PHP 7 installed. Then, there are multiple ways to install. Choose the one best for you:

- [phive](#phive)
- [download](#download)
- [composer](#composer)
- [source](#source)

### Phive

[](#phive)

The most preferred method of installation is to use [phive](https://phar.io/). This avoids dependency conflicts between tools using different versions of libraries (like Carbon or Symfony Console).

Install to some directory that's in your `PATH` such as `~/bin` or `/usr/local/bin`

```
phive install carbon --target ~/bin

```

This creates `phive.xml` in your current directory. If you're into versioning your dotfiles, consider creating a symlink to this.

Then you'll be able to easily update when new versions are released.

```
phive update

```

### Download

[](#download)

[Download the latest phar release](https://github.com/jpuck/carbon-console/releases/latest), set it executable, and move it to a good `PATH`

Here's a oneline `sudo` command to make it available system-wide:

```
curl -sSL https://github.com/jpuck/carbon-console/releases/latest | egrep -o '/jpuck/carbon-console/releases/download/[0-9\.]*/carbon-console.phar"' | head -c-2 | wget --base=https://github.com/ -i - -O carbon && chmod +x carbon && sudo mv carbon /usr/local/bin/

```

If you don't have `sudo` privileges, then you can omit the last part `sudo mv carbon /usr/local/bin/` and just save it somewhere in your user's `PATH`such as `~/bin` or simply execute it verbosely with the PHP CLI.

```
php carbon-console.phar

```

### Composer

[](#composer)

[Registered on packagist](https://packagist.org/packages/jpuck/carbon-console) for installation using [composer](https://getcomposer.org/).

```
composer global require jpuck/carbon-console

```

Make sure your `PATH` contains the [global bin directory](https://getcomposer.org/doc/03-cli.md#global) which you can find:

```
composer global config bin-dir --absolute

```

You can then [add that location to your shell profile or rc so that it's always available](http://unix.stackexchange.com/a/26059/148062). For example, if you're running Ubuntu 16.04 with bash, then this might work:

```
echo 'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> ~/.bashrc

```

**NOTE** that you will probably have to contend with a dependency conflict sooner or later with each additional package you install. This is why [phive](#phive) is preferred.

### Source

[](#source)

```
git clone https://github.com/jpuck/carbon-console.git
cd carbon-console
composer install
./bin/carbon

```

Usage
-----

[](#usage)

After installing, run the `list` command to see a list of commands:

```
carbon list

```

Use the `help` command to get help with any command's usage:

```
carbon help convert

```

The primary command is `convert` which defaults input time now and output timezone local.

> ```
> Usage:
>   convert [-o|--timezone-out [TIMEZONE-OUT]] [-f|--format-out [FORMAT-OUT]] [--] []...
>
> ```

See the documentation for a list of supported input formats for [date, time](http://php.net/manual/en/datetime.formats.php), and [timezones](http://php.net/manual/en/timezones.php). Also see available [output formats](http://php.net/manual/en/function.date.php#refsect1-function.date-parameters).

Examples
--------

[](#examples)

For the following examples, my system's local timezone is set to UTC.

When it's 8:00AM in Chicago, what time will it be here?

```
carbon convert 8:00AM America/Chicago

```

> ```
> 2017-02-16T14:00:00+00:00 UTC
>
> ```

It's 5:18PM here, so what time is it in Casey Station?

```
carbon convert -o Antarctica/Casey

```

> ```
> 2017-02-17T04:18:12+11:00 Antarctica/Casey
>
> ```

When it's 6:00PM here, what time will it be in Casey Station?

```
carbon convert 6:00PM -o Antarctica/Casey

```

> ```
> 2017-02-17T05:00:00+11:00 Antarctica/Casey
>
> ```

When it's 6:00PM in Chicago, what time will it be in Casey Station?

```
carbon convert 6:00PM America/Chicago -o Antarctica/Casey

```

> ```
> 2017-02-17T11:00:00+11:00 Antarctica/Casey
>
> ```

Let's format that output as 12-hour:minute

```
carbon convert 6:00PM America/Chicago -o Antarctica/Casey -f h:iA

```

> ```
> 11:00AM
>
> ```

If you use spaces in your format, make sure to quote the argument.

```
carbon convert 6:00PM America/Chicago -o Antarctica/Casey -f 'h:iA l, F j'

```

> ```
> 11:00AM Friday, February 17
>
> ```

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3420d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4d3f43ad248cd9c696b067b19e4e18856d78a8b2e4f2c3ee21a1d3d5cead5610?d=identicon)[jpuck](/maintainers/jpuck)

---

Top Contributors

[![jpuck](https://avatars.githubusercontent.com/u/15305396?v=4)](https://github.com/jpuck "jpuck (14 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jpuck-carbon-console/health.svg)

```
[![Health](https://phpackages.com/badges/jpuck-carbon-console/health.svg)](https://phpackages.com/packages/jpuck-carbon-console)
```

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.1k91.3M282](/packages/laravel-horizon)[bitrix24/b24phpsdk

An official PHP library for the Bitrix24 REST API

10139.4k5](/packages/bitrix24-b24phpsdk)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
