Question: How to create a user on redhat instance during the launch? I tried include the following commands in the user data but didn't work. Any idea why? or is there another way of creating a user using userdata?

```
sudo su
useradd -s /bin/bash -m -d /home/testuser  -g root testuser
echo P@ssc0deT3st | passwd testuser --stdin
sed -re 's/^(PasswordAuthentication)([[:space:]]+)no/\1\2yes/' -i.`date -I` /etc/ssh/sshd_config
service sshd restart

```

Answer: 
The best way about it would be to transform your notification data before displaying it. You can use regular expression for it or just parse your date and then use date methods.

```js
angular.module('app', []);

angular
  .module('app')
  .controller('Example', function ($scope) {
    const inputData = [
      {text: 'some text', notif_date: '2016-05-13 16:08:33'},
      {text: 'some text', notif_date: '2017-06-13 18:28:33'}
    ];

    $scope.notifications = inputData.map(({text, notif_date}) => {
      const regexp = /^\d{4}-(\d{1,2})-(\d{1,2})\s*([\d:]*)$/;
      const matched = notif_date.match(regexp);

      return {
        text,
        month: matched[1],
        date: matched[2],
        time: matched[3]
      };
    });
  });
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div ng-app="app" ng-controller="Example">
<div class="list-expense-menu-item" ng-repeat="notification in notifications">
  <h2>{{notification.text}}</h2>
  <span>Month:{{notification.month}}</span>
  <span>Date:{{notification.date}}</span>
  <span>Time:{{notification.time}}</span>
</div>
</div>
```

Example with Date, cos your string can be easily parsed by new Date().

```js
angular.module('app', []);

angular
  .module('app')
  .controller('Example', function ($scope) {
    const inputData = [
      {text: 'some text', notif_date: '2016-05-13 16:08:33'},
      {text: 'some text', notif_date: '2017-06-13 18:28:33'}
    ];

    $scope.notifications = inputData.map(({text, notif_date}) => {
      const date = new Date(notif_date);

      return {
        text,
        month: date.getMonth() + 1, //+1 because in JS months are numbered 0 - 11, so January is 0 and so on 
        date: date.getDate(),
        time: date.getHours() + ':' + date.getMinutes()
      };
    });
  });
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div ng-app="app" ng-controller="Example">
<div class="list-expense-menu-item" ng-repeat="notification in notifications">
  <h2>{{notification.text}}</h2>
  <span>Month:{{notification.month}}</span>
  <span>Date:{{notification.date}}</span>
  <span>Time:{{notification.time}}</span>
</div>
</div>
```
In your controller modify the notif\_date like this.

```
 notifications.forEach(function(notification){
   notification.notif_date = new Date(notification.notif_date);
 })

```

and try angular date [filter](https://docs.angularjs.org/api/ng/filter/date) in the view.

```
  <span>Month:{{notification.notif_date | date:'MM'}}</span>
  <span>Date:{{notification.notif_date | date:'dd'}}</span>
  <span>Year:{{notification.notif_date | date:'yyyy'}}</span>

```